90% wp-api-v2-woocommerce-endpoints

Code Review | WP API (V2) WooCommerce endpoints

WordPress plugin WP API (V2) WooCommerce endpoints scored90%from 54 tests.

About plugin

  • Plugin page: wp-api-v2-woocomm...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.5
  • WordPress version: 6.3.1
  • First release: Mar 23, 2016
  • Latest release: Apr 26, 2016
  • Number of updates: 4
  • Update frequency: every 9.0 days
  • Top authors: oleg2tor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,426 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.46ms] Passed 4 tests

An overview of server-side resources used by WP API (V2) WooCommerce endpoints
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.14 ▼9.40
Dashboard /wp-admin3.32 ▲0.0156.89 ▼3.93
Posts /wp-admin/edit.php3.37 ▲0.0160.38 ▲5.54
Add New Post /wp-admin/post-new.php5.90 ▲0.01106.68 ▼6.34
Media Library /wp-admin/upload.php3.24 ▲0.0133.34 ▼14.16

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WP API (V2) WooCommerce endpoints
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲8913.23 ▼1.045.41 ▲3.1750.88 ▼24.95
Dashboard /wp-admin2,206 ▲274.91 ▲0.05132.22 ▲4.3056.61 ▲10.76
Posts /wp-admin/edit.php2,092 ▼02.01 ▲0.0044.00 ▼2.4044.17 ▲5.88
Add New Post /wp-admin/post-new.php1,537 ▲423.43 ▲2.32707.90 ▼56.8675.00 ▲3.82
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.00105.77 ▼12.4848.91 ▼5.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: woocommerce, json, wp-rest-api, api, rest...

wp-api-v2-woocommerce-endpoints/wp-api-woocommerce-endpoints.php 92% from 13 tests

The entry point to "WP API (V2) WooCommerce endpoints" version 1.0.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-api-v2-woocommerce-endpoints.php" instead of "wp-api-woocommerce-endpoints.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin66 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1287766

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin