84% ginbox-for-woocommerce

Code Review | GINBOX for WooCommerce

WordPress plugin GINBOX for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: ginbox-for-woocom...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 6.3.1
  • First release: Aug 23, 2021
  • Latest release: Aug 23, 2021
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: ginbox (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /265 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.37ms] Passed 4 tests

A check of server-side resources used by GINBOX for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0232.81 ▼15.96
Dashboard /wp-admin3.33 ▲0.0242.69 ▼5.22
Posts /wp-admin/edit.php3.38 ▲0.0246.82 ▼0.13
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.02 ▼20.17
Media Library /wp-admin/upload.php3.25 ▲0.0234.85 ▲2.45

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by GINBOX for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.63 ▼0.961.47 ▼0.4838.69 ▼6.19
Dashboard /wp-admin2,213 ▲224.85 ▼0.06111.79 ▲12.0143.66 ▼0.75
Posts /wp-admin/edit.php2,095 ▲62.01 ▼0.0040.41 ▲6.2238.63 ▲3.46
Add New Post /wp-admin/post-new.php1,549 ▲3518.35 ▲0.68617.40 ▼88.2153.83 ▼5.12
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0598.62 ▼6.1742.36 ▼7.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Ginbox_API' not found in wp-content/plugins/ginbox-for-woocommerce/includes/class-wc-ginbox-public.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ginbox-for-woocommerce/includes/class-wc-ginbox-admin.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: shipping address, ginbox, autofill address, woocommerce ginbox, billing address

ginbox-for-woocommerce/ginbox-for-woocommerce.php 92% from 13 tests

The main PHP script in "GINBOX for WooCommerce" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Requires PHP: Required version must match the one declared in readme.txt ("5.2.4" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected573 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP693224288
CSS412149
JavaScript2724136

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity11.25
▷ Minimum class complexity2.00
▷ Maximum class complexity33.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods1145.83%
▷ Public methods2187.50%
▷ Protected methods00.00%
▷ Private methods312.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin