84% proto-ai-commerce

Code Review | Proto AI Commerce

WordPress plugin Proto AI Commerce scored84%from 54 tests.

About plugin

  • Plugin page: proto-ai-commerce
  • Plugin version: 0.3.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 24, 2022
  • Latest release: Oct 3, 2023
  • Number of updates: 42
  • Update frequency: every 8.3 days
  • Top authors: leandrolabrana (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,080 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.53ms] Passed 4 tests

Server-side resources used by Proto AI Commerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.55 ▲1.98
Dashboard /wp-admin3.38 ▲0.0745.99 ▼14.41
Posts /wp-admin/edit.php3.43 ▲0.0747.17 ▼4.02
Add New Post /wp-admin/post-new.php5.96 ▲0.0782.87 ▼12.23
Media Library /wp-admin/upload.php3.30 ▲0.0737.78 ▲0.55

Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_proto_ai_recommendations_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Proto AI Commerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9813.27 ▼1.417.74 ▲6.1438.55 ▼0.43
Dashboard /wp-admin2,214 ▲265.86 ▼0.0498.57 ▼5.0184.51 ▲45.24
Posts /wp-admin/edit.php2,103 ▲172.02 ▲0.0535.55 ▼2.3039.94 ▲3.57
Add New Post /wp-admin/post-new.php1,677 ▲16322.59 ▲5.12739.84 ▲41.7250.60 ▼2.16
Media Library /wp-admin/upload.php1,390 ▲24.13 ▼0.0995.02 ▼10.6268.42 ▲22.97

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_proto_ai_recommendations_widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/proto-ai-commerce/proto_ai_recommendations_injector.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/proto-ai-commerce/proto_ai_recommendations.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/proto-ai-commerce/no_woo_commerce/proto_ai_admin_menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/proto-ai-commerce/proto_ai_admin_menu.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
There were not plugin tags detected

proto-ai-commerce/proto-ai-commerce.php Passed 13 tests

"Proto AI Commerce" version 0.3.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
48 characters long description:
Industry-leading AI-driven recommendation engine

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected931 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1420695865
CSS19251
JavaScript14215

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions35
▷ Named functions3291.43%
▷ Anonymous functions38.57%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/proto-ai-logo.png18.02KB4.93KB▼ 72.63%
images/proto-ai-icon.png1.81KB1.19KB▼ 34.14%