77% subscription-epayco

Code Review | Subscription ePayco

WordPress plugin Subscription ePayco scored77%from 54 tests.

About plugin

  • Plugin page: subscription-epayco
  • Plugin version: 3.0.11
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 26, 2019
  • Latest release: Oct 3, 2023
  • Number of updates: 41
  • Update frequency: every 40.3 days
  • Top authors: saulmorales (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /7,901 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.84ms] Passed 4 tests

A check of server-side resources used by Subscription ePayco
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.28 ▼1.17
Dashboard /wp-admin3.33 ▼0.0242.98 ▼21.99
Posts /wp-admin/edit.php3.39 ▲0.0247.64 ▲5.75
Add New Post /wp-admin/post-new.php5.92 ▲0.0282.78 ▼13.95
Media Library /wp-admin/upload.php3.26 ▲0.0238.34 ▲7.71

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 235 new files
Database: 1 new table, 7 new options
New tables
wp_subscription_epayco
New WordPress options
widget_theysaidso_widget
subscription_epayco_se_redirect
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Subscription ePayco: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.32 ▲0.031.78 ▲0.0642.84 ▲0.22
Dashboard /wp-admin2,198 ▲245.56 ▼0.0280.15 ▼6.0637.78 ▼5.57
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0732.87 ▼6.1935.21 ▲1.24
Add New Post /wp-admin/post-new.php1,542 ▲1223.04 ▼0.12661.28 ▲71.0160.63 ▲8.73
Media Library /wp-admin/upload.php1,406 ▲64.22 ▲0.0198.60 ▼3.4241.89 ▼3.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • subscription_epayco_se_redirect
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 7× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/examples/get.php
    • > /wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/bin/create_pear_package.php
    • > /wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/examples/session.php
    • > /wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/examples/multiple.php
    • > /wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/examples/basic-auth.php
    • > /wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/examples/post.php
    • > /wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/examples/cookie_jar.php
  • 124× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/library/Requests/Exception/HTTP/404.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Epayco\\Resource' not found in wp-content/plugins/subscription-epayco/lib/vendor/epayco/epayco-php/src/Resources/Cash.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WpOrg\\Requests\\Exception\\Http' not found in wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/src/Exception/Http/Status414.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WpOrg\\Requests\\Utility\\CaseInsensitiveDictionary' not found in wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/src/Response/Headers.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'WpOrg\\Requests\\HookManager' not found in wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/src/Hooks.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WpOrg\\Requests\\Exception\\Http' not found in wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/src/Exception/Http/Status500.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WpOrg\\Requests\\Exception\\Http' not found in wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/src/Exception/Http/Status505.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/library/Requests/Exception/HTTP/418.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WpOrg\\Requests\\Exception\\Http' not found in wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/src/Exception/Http/Status408.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/subscription-epayco/lib/vendor/rmccue/requests/library/Requests/Exception/HTTP/405.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #2 is required in subscription-epayco/assets to your readme.txt
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt might help

subscription-epayco/subscription-epayco.php 85% from 13 tests

The main PHP script in "Subscription ePayco" version 3.0.11 is automatically included on every request by WordPress
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("6.0" instead of "4.0")
  • Git Repository: Please do not include Git repositories in your plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin14,324 lines of code in 219 files:
LanguageFilesBlank linesComment linesLines of code
PHP1832,5597,14211,589
Markdown1360501,744
JavaScript58533387
JSON600308
PO File24042116
XML34086
YAML311666
Bourne Shell24012
CSS12012
Python1104

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.63
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces15
Interfaces9
Traits0
Classes157
▷ Abstract classes10.64%
▷ Concrete classes15699.36%
▷ Final classes4528.85%
Methods697
▷ Static methods11316.21%
▷ Public methods60887.23%
▷ Protected methods7610.90%
▷ Private methods131.87%
Functions21
▷ Named functions1257.14%
▷ Anonymous functions942.86%
Constants59
▷ Global constants610.17%
▷ Class constants5389.83%
▷ Public constants53100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png1.50KB0.91KB▼ 39.30%