84% cash-pickup

Code Review | Payment Cash Pickup

WordPress plugin Payment Cash Pickup scored84%from 54 tests.

About plugin

  • Plugin page: cash-pickup
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9
  • WordPress version: 6.3.1
  • First release: Jun 20, 2016
  • Latest release: Nov 28, 2017
  • Number of updates: 28
  • Update frequency: every 22.2 days
  • Top authors: ilariotr (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /4,829 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Payment Cash Pickup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.12 ▼3.78
Dashboard /wp-admin3.31 ▲0.0143.51 ▼2.09
Posts /wp-admin/edit.php3.36 ▲0.0047.77 ▲1.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.92 ▲7.34
Media Library /wp-admin/upload.php3.23 ▲0.0034.10 ▼0.89

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Payment Cash Pickup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.26 ▼1.002.04 ▲0.1341.45 ▼2.29
Dashboard /wp-admin2,203 ▲115.83 ▲0.86106.58 ▲2.0436.93 ▼6.36
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0839.66 ▼0.7236.91 ▲2.13
Add New Post /wp-admin/post-new.php1,538 ▼223.06 ▼0.04660.95 ▲64.0058.33 ▲10.23
Media Library /wp-admin/upload.php1,382 ▼04.15 ▼0.1198.61 ▲0.3240.98 ▲0.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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)
Good news, no errors were detected

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cash-pickup/payment-cash-pickup.php:56

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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: Add an image for screenshot #1 (Payment Cash Pickup settings page)
Please take inspiration from this readme.txt

cash-pickup/payment-cash-pickup.php 92% from 13 tests

"Payment Cash Pickup" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("cash-pickup.php" instead of "payment-cash-pickup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected261 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP237108152
PO File23434101
XML1008

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png47.21KB21.69KB▼ 54.05%