84% woocommerce-globalpay

Code Review | Woocommerce GlobalPay

WordPress plugin Woocommerce GlobalPay scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-globa...
  • Plugin version: 3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jan 28, 2014
  • Latest release: Jun 1, 2015
  • Number of updates: 22
  • Update frequency: every 22.3 days
  • Top authors: Feyisayo (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /4,324 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.69ms] Passed 4 tests

An overview of server-side resources used by Woocommerce GlobalPay
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1340.92 ▲1.37
Dashboard /wp-admin3.43 ▲0.1346.85 ▼5.10
Posts /wp-admin/edit.php3.55 ▲0.1945.98 ▼3.77
Add New Post /wp-admin/post-new.php6.02 ▲0.1383.57 ▼11.05
Media Library /wp-admin/upload.php3.36 ▲0.1233.38 ▲1.18

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 25 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

Woocommerce GlobalPay: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.24 ▲0.051.77 ▼0.0745.16 ▲0.44
Dashboard /wp-admin2,197 ▲235.62 ▲0.1088.43 ▼0.4441.48 ▼3.66
Posts /wp-admin/edit.php2,110 ▲102.00 ▲0.0536.01 ▼0.6134.96 ▼2.25
Add New Post /wp-admin/post-new.php1,537 ▲818.35 ▼5.42621.20 ▲8.3665.47 ▲18.61
Media Library /wp-admin/upload.php1,402 ▼14.19 ▲0.0193.84 ▼5.0544.33 ▼0.23

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 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/woocommerce-globalpay/lib/class.soapclient.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-globalpay/lib/class.wsdl.php:15
    • > PHP Warning
      require_once(Mail/mimeDecode.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-globalpay/lib/nusoapmime.php on line 42
    • > PHP Fatal error
      require_once(): Failed opening required 'Mail/mimeDecode.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-globalpay/lib/nusoapmime.php on line 42
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-globalpay/lib/class.soap_server.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-globalpay/lib/class.soap_val.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-globalpay/lib/class.soap_parser.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-globalpay/lib/class.soap_fault.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-globalpay/lib/class.xmlschema.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-globalpay/lib/class.soap_transport_http.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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: wordpress ecommerce, woocommerce, e-commerce, globalpay, payment gateway...

woocommerce-globalpay/woocommerce-globalpay.php Passed 13 tests

The main file in "Woocommerce GlobalPay" v. 3.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
Allows payments to be made to a Woocommerce shop via GlobalPay

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin11,856 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP149845,21811,759
CSS16063
JavaScript12224
SVG11010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity77.69
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity8.96
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes35
▷ Abstract classes00.00%
▷ Concrete classes35100.00%
▷ Final classes00.00%
Methods337
▷ Static methods00.00%
▷ Public methods33699.70%
▷ Protected methods00.00%
▷ Private methods10.30%
Functions21
▷ Named functions21100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/requery.png1.11KB0.43KB▼ 61.49%
images/globalpay_logo.png6.50KB3.06KB▼ 52.85%