84% payday

Code Review | Payday

WordPress plugin Payday scored84%from 54 tests.

About plugin

  • Plugin page: payday
  • Plugin version: 3.1.8
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 16, 2020
  • Latest release: Nov 13, 2023
  • Number of updates: 95
  • Update frequency: every 12.8 days
  • Top authors: egillanton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /3,149 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.91ms] Passed 4 tests

A check of server-side resources used by Payday
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.28 ▼4.72
Dashboard /wp-admin3.31 ▲0.0044.22 ▼6.42
Posts /wp-admin/edit.php3.36 ▲0.0047.52 ▼3.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.07 ▼8.96
Media Library /wp-admin/upload.php3.23 ▲0.0035.94 ▲4.26

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 104 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Payday: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.27 ▲0.011.69 ▲0.0742.84 ▼2.24
Dashboard /wp-admin2,195 ▲185.62 ▲0.0591.58 ▼9.6439.78 ▼2.96
Posts /wp-admin/edit.php2,100 ▼31.96 ▲0.0240.44 ▲1.9236.67 ▲1.63
Add New Post /wp-admin/post-new.php1,526 ▼023.38 ▲0.13663.80 ▲55.3063.81 ▲12.67
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0298.47 ▼6.1943.60 ▲1.85

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 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'PAYDAY_DIR_PATHpayday-api-gateway/enums/enum-payday-gateway-error-code.php' (include_path='.:/usr/share/php') in wp-content/plugins/payday/payday-api-gateway/class-payday-gateway-error.php on line 3
    • > PHP Warning
      Use of undefined constant PAYDAY_DIR_PATH - assumed 'PAYDAY_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/payday/payday-api-gateway/class-payday-gateway-error.php on line 3
    • > PHP Warning
      require_once(PAYDAY_DIR_PATHpayday-api-gateway/enums/enum-payday-gateway-error-code.php): failed to open stream: No such file or directory in wp-content/plugins/payday/payday-api-gateway/class-payday-gateway-error.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3 in payday/assets to your readme.txt
The official readme.txt might help

payday/payday.php 92% from 13 tests

The main PHP script in "Payday" version 3.1.8 is automatically included on every request by WordPress
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.1" instead of "3.0.0")

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
Good job! No executable or dangerous file extensions detected5,265 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
PHP731,3102,0574,892
PO File1150235342
Markdown118031

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity9.70
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces1
Traits1
Classes68
▷ Abstract classes811.76%
▷ Concrete classes6088.24%
▷ Final classes11.67%
Methods246
▷ Static methods9136.99%
▷ Public methods19478.86%
▷ Protected methods31.22%
▷ Private methods4919.92%
Functions15
▷ Named functions853.33%
▷ Anonymous functions746.67%
Constants96
▷ Global constants88.33%
▷ Class constants8891.67%
▷ Public constants88100.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
payment_gateway_logo.png2.91KB2.00KB▼ 31.37%