89% zero-ecoimpact-woocommerce

Code Review | Zei - WooCommerce

WordPress plugin Zei - WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: zero-ecoimpact-wo...
  • Plugin version: 1.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.9
  • WordPress version: 6.3.1
  • First release: Jan 30, 2017
  • Latest release: Feb 27, 2019
  • Number of updates: 21
  • Update frequency: every 36.0 days
  • Top authors: n4zim (85.71%)timzei (19.05%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,238 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.00MB] [CPU: ▼3.83ms] Passed 4 tests

An overview of server-side resources used by Zei - WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.01 ▼3.20
Dashboard /wp-admin3.31 ▲0.0050.64 ▼3.32
Posts /wp-admin/edit.php3.36 ▲0.0050.73 ▼1.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.94 ▼7.58
Media Library /wp-admin/upload.php3.23 ▲0.0039.94 ▲2.92

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Zei - WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.44 ▲0.041.63 ▼0.2439.55 ▼2.06
Dashboard /wp-admin2,218 ▲155.85 ▲0.95111.06 ▲7.8045.35 ▲2.85
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0138.08 ▼2.4434.16 ▼2.70
Add New Post /wp-admin/post-new.php1,545 ▲1423.17 ▲0.16630.78 ▲4.2852.60 ▼31.45
Media Library /wp-admin/upload.php1,400 ▲34.24 ▼0.04112.19 ▼5.5047.88 ▼5.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: ecology, woocomerce, zei, api

zero-ecoimpact-woocommerce/zei-wc.php 85% from 13 tests

"Zei - WooCommerce" version 1.8.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("zero-ecoimpact-woocommerce.php" instead of "zei-wc.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin385 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP59694385

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity19.60
▷ Minimum class complexity5.00
▷ Maximum class complexity31.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods29
▷ Static methods620.69%
▷ Public methods2586.21%
▷ Protected methods00.00%
▷ Private methods413.79%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin