84% api-improver-for-woocommerce

Code Review | API Improver for WooCommerce

WordPress plugin API Improver for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: api-improver-for-...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.6
  • WordPress version: 6.3.1
  • First release: Dec 23, 2020
  • Latest release: Jan 7, 2021
  • Number of updates: 5
  • Update frequency: every 3.2 days
  • Top authors: mariovalney (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /471 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by API Improver for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.09 ▼2.72
Dashboard /wp-admin3.37 ▲0.0752.11 ▼0.26
Posts /wp-admin/edit.php3.49 ▲0.1348.84 ▲0.37
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.59 ▼20.45
Media Library /wp-admin/upload.php3.30 ▲0.0733.71 ▼3.13

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

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

Browser metrics Passed 4 tests

A check of browser resources used by API Improver for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.20 ▼1.181.83 ▼0.1038.99 ▼7.85
Dashboard /wp-admin2,214 ▲265.82 ▼0.0899.92 ▼21.9437.98 ▼6.71
Posts /wp-admin/edit.php2,100 ▲112.07 ▲0.0736.77 ▲0.7732.66 ▼3.04
Add New Post /wp-admin/post-new.php1,525 ▼817.62 ▼5.43705.21 ▲22.0158.17 ▲5.78
Media Library /wp-admin/upload.php1,396 ▲54.26 ▲0.0496.11 ▼1.4242.08 ▼0.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/api-improver-for-woocommerce/modules/woocommerce/class-module-woocommerce.php
    • > /wp-content/plugins/api-improver-for-woocommerce/modules/dependence/includes/views/html-notice.php
    • > /wp-content/plugins/api-improver-for-woocommerce/modules/woocommerce/includes/api/v3/class-products.php
    • > /wp-content/plugins/api-improver-for-woocommerce/api-improver-for-woocommerce.php
    • > /wp-content/plugins/api-improver-for-woocommerce/modules/dependence/class-module-dependence.php

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: api, products, rest, woocommerce, mariovalney

api-improver-for-woocommerce/api-improver-for-woocommerce.php 85% from 13 tests

The principal PHP file in "API Improver for WooCommerce" v. 1.1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "4.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin323 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6112296323

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity13.25
▷ Minimum class complexity4.00
▷ Maximum class complexity26.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods1661.54%
▷ Protected methods13.85%
▷ Private methods934.62%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin