84% woo-masterway

Code Review | WooCommerce + Masterway

WordPress plugin WooCommerce + Masterway scored84%from 54 tests.

About plugin

  • Plugin page: woo-masterway
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 28, 2016
  • Latest release: Oct 31, 2023
  • Number of updates: 66
  • Update frequency: every 37.8 days
  • Top authors: mslsantos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,041 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 gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▼3.14ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce + Masterway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2049.67 ▲8.58
Dashboard /wp-admin3.51 ▲0.1648.87 ▼14.86
Posts /wp-admin/edit.php3.62 ▲0.2648.00 ▼2.97
Add New Post /wp-admin/post-new.php6.09 ▲0.2098.03 ▲2.92
Media Library /wp-admin/upload.php3.43 ▲0.2039.25 ▲2.37

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce + Masterway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5413.92 ▼0.481.83 ▲0.0644.37 ▼2.66
Dashboard /wp-admin2,195 ▲185.56 ▼0.0583.74 ▼5.9838.40 ▼2.98
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0136.18 ▼3.3034.40 ▼3.64
Add New Post /wp-admin/post-new.php1,535 ▲918.38 ▼5.46628.33 ▼33.1266.41 ▼2.38
Media Library /wp-admin/upload.php1,394 ▼94.20 ▼0.04101.94 ▲7.6742.06 ▼2.06

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-masterway/MasterwayRequest-PHP-API/lib/nusoap/class.soap_val.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-masterway/MasterwayRequest-PHP-API/lib/nusoap/class.soap_transport_http.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-masterway/MasterwayRequest-PHP-API/lib/nusoap/class.soapclient.php:26
    • > PHP Fatal error
      require_once(): Failed opening required 'Mail/mimeDecode.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-masterway/MasterwayRequest-PHP-API/lib/nusoap/nusoapmime.php on line 42
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-masterway/MasterwayRequest-PHP-API/lib/nusoap/class.soap_fault.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-masterway/MasterwayRequest-PHP-API/lib/nusoap/class.soap_parser.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-masterway/MasterwayRequest-PHP-API/lib/nusoap/class.wsdl.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-masterway/MasterwayRequest-PHP-API/lib/nusoap/class.soap_server.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-masterway/woo-includes/woo-functions.php:305
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woo-masterway/MasterwayRequest-PHP-API/lib/nusoap/class.xmlschema.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
6 plugin tags: ecommerce, woocommerce, billing, invoicing, masterway...

woo-masterway/woocommerce-masterway.php 92% from 13 tests

The primary PHP file in "WooCommerce + Masterway" version 1.2.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-masterway.php" instead of "woocommerce-masterway.php")

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
Success! There were no dangerous files found in this plugin12,831 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP161,1135,38212,704
PO File14544125
Markdown1102

PHP code Passed 2 tests

An overview 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.46
Average class complexity72.67
▷ Minimum class complexity1.00
▷ Maximum class complexity390.00
Average method complexity8.45
▷ Minimum method complexity1.00
▷ Maximum method complexity84.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes39
▷ Abstract classes00.00%
▷ Concrete classes39100.00%
▷ Final classes00.00%
Methods375
▷ Static methods20.53%
▷ Public methods375100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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