I find their marketing to be rather disagreeable: "No more expensive developers, or tedious StackOverflow searches." At best, this just changes the expertise that is useful to have (as well as the content of the StackOverflow searches that will still be made). Still an interesting piece of software.
> No more expensive developers, or tedious StackOverflow searches. Is't it quite ironic, that somehow this product statement is sneering on the exact kind of people ("expensive developers") that are required to build the product itself?
AI WordPress code snippet generator
11–20 of 23 posts
Re: AI WordPress code snippet generator
#12 function get_reviews() {
$api_key = 'AIzaSyB-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q';
$place_id = 'ChIJQ_Q-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q';
$url = 'https://maps.googleapis.com/maps/api/place/details/json?placeid=' . $place_id . '&key=' . $api_key;
$json = file_get_contents($url);
$obj = json_decode($json);
$reviews = $obj->result->reviews;
$review_count = count($reviews);
$review_html = '';
for ($i = 0; $i author_name . '';
$review_html .= '';
$review_html .= '';
$review_html .= '';
for ($j = 0; $j rating; $j++) {
$review_html .= '';
}
$review_html .= '';
$review_html .= '' . date('F j, Y', strtotime($reviews[$i]->time)) . '';
$review_html .= '';
$review_html .= '' . $reviews[$i]->text . '';
$review_html .= '';
}
return $review_html;
}
add_shortcode('get_reviews', 'get_reviews');
...well, it's certainly not making the WordPress community codebase worse.Re: AI WordPress code snippet generator
#13I like this "no-code" approach to website building. it has that "without coding" aspect, without being captive to these "no-code" website builders out there.
Re: AI WordPress code snippet generator
#14I think it's cool, but $8/mo is outrageous. I also hate the demo model, why not just limit my account to 5 queries or something so I can see how it works? Most WP code people deal with are simple loops that people just have saved elsewhere. Rarely do you need something crazily complex. Honestly a CSS/HTML ai generator would be incredible.
It's outrageously cheap.
Wordpress plugins are insanely expensive, yet businesses will not hesitate to install dozens of them. $8 / month is a rounding error for most web agencies developing WordPress websites.
People would pay $49 a month for that crap.
Re: AI WordPress code snippet generator
#15Imagine having that as a selling point lol.
Re: AI WordPress code snippet generator
#16I like this "no-code" approach to website building. it has that "without coding" aspect, without being captive to these "no-code" website builders out there.
Maybe your point is lost on me but AI “copilots” are still super high-code.
I'm not very familiar with current AI “copilots” performance, and I'm more thinking in term of the "ideal" code generator (= good output)
It may seem like a stretch, but I’m one of those who dislike coding everything A-Z while still acquiescing to editing (good) code and enjoing integrating it.
Re: AI WordPress code snippet generator
#17From https://codewp.ai/snippet/6herwuh5divtkvqlvkebirbxymu26/ : function get_reviews() { $api_key = 'AIzaSyB-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q'; $place_id = 'ChIJQ_Q-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q'; $url = 'https://maps.googleapis.com/maps/api/place/details/json?placeid=' . $place_id . '&key=' . $api_key; $json = file_get_contents($url); $obj = json_decode($json); $reviews = $obj->result->reviews; $review_count = count($reviews);…
We wrote about ~85% of our relatively simple Wordpress plugin[1] using Copilot with no prior WP knowledge, it took maybe 2 hours at most, it's pretty decent and works well, clients are happy. Just had to write a 3-4 line comments of exactly what we wanted, it got it almost right on the first try, it was able to handle writing and reading configuration from the database as well. The only thing it struggled with was posting binary file content which is understandable.
1: https://www.faceshape.com/docs/integrations/wordpress to see the code if interested.
Re: AI WordPress code snippet generator
#18Re: AI WordPress code snippet generator
#19I think it's cool, but $8/mo is outrageous. I also hate the demo model, why not just limit my account to 5 queries or something so I can see how it works? Most WP code people deal with are simple loops that people just have saved elsewhere. Rarely do you need something crazily complex. Honestly a CSS/HTML ai generator would be incredible.
> but $8/mo is outrageous It's outrageously cheap. Wordpress plugins are insanely expensive, yet businesses will not hesitate to install dozens of them. $8 / month is a rounding error for most web agencies developing WordPress websites. People would pay $49 a month for that crap.
And for more advanced stuff, you already have co-pilot, if you wanted something similar.
Re: AI WordPress code snippet generator
#20From https://codewp.ai/snippet/6herwuh5divtkvqlvkebirbxymu26/ : function get_reviews() { $api_key = 'AIzaSyB-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q'; $place_id = 'ChIJQ_Q-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q-Q_Q'; $url = 'https://maps.googleapis.com/maps/api/place/details/json?placeid=' . $place_id . '&key=' . $api_key; $json = file_get_contents($url); $obj = json_decode($json); $reviews = $obj->result->reviews; $review_count = count($reviews);…
For what it's worth, while this code generator might not be great, github copilot is pretty damn good at handling wordpress already (no need to specialize it for a specific thing I guess). We wrote about ~85% of our relatively simple Wordpress plugin[1] using Copilot with no prior WP knowledge, it took maybe 2 hours at most, it's pretty decent and works well, clients are happy. Just had to write a 3-4 line comments o…
post_with_file() in api.php makes me squinty. There's a lot of dead code in there; unless I'm missing something, that function is only called from infer_faceshape(), and that function is passing a harcoded empty array for the second parameter, which means the foreach(...) loop in it never fires. Ditto for the $filename parameter and the conditional that handles it. I'd also raise some concern about passing $file_path directly to your post data; WP core does some upload filename sanitation, I think, but I don't recall how much or how good it is (or isn't), and anyone that can reach your post_with_file() function might be able to post arbitrary data to your API endpoint (but maybe your API is robust enough that that's not a big deal). WP core has some functions for handling file uploads and filename sanitation that might be helpful here, e.g.: https://developer.wordpress.org/reference/functions/media_ha...
If your plugin is only storing an API key and another setting or two, the best practice is to use WP's options API instead of creating your own table: https://codex.wordpress.org/Options_API
Overall though, Copilot produced some code that's pretty darn standard for the WP community, and knocking it out in 2 hours starting from scratch is way more efficient than I could (or would want to) knucklebust it myself. Cool!