74% ctcl-phone-pay

Code Review | CTCL Phone Pay

WordPress plugin CTCL Phone Pay scored74%from 54 tests.

About plugin

  • Plugin page: ctcl-phone-pay
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 21, 2020
  • Latest release: May 21, 2023
  • Number of updates: 14
  • Update frequency: every 65.1 days
  • Top authors: ujw0l (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /470 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼59.91ms] Passed 4 tests

A check of server-side resources used by CTCL Phone Pay
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.02 ▼42.72
Dashboard /wp-admin2.05 ▼1.267.11 ▼52.02
Posts /wp-admin/edit.php2.05 ▼1.315.84 ▼45.74
Add New Post /wp-admin/post-new.php2.05 ▼3.845.53 ▼99.17
Media Library /wp-admin/upload.php2.05 ▼1.185.93 ▼28.64

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for CTCL Phone Pay
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲15913.41 ▼0.888.66 ▲6.8342.32 ▼1.30
Dashboard /wp-admin2,203 ▲295.55 ▼0.0489.89 ▼0.9738.19 ▼2.67
Posts /wp-admin/edit.php2,119 ▲192.03 ▲0.0245.09 ▲7.2637.08 ▲0.35
Add New Post /wp-admin/post-new.php1,548 ▲2223.13 ▲5.57669.68 ▲6.0664.78 ▲14.75
Media Library /wp-admin/upload.php1,416 ▲194.42 ▲0.23102.89 ▲2.0648.36 ▲5.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the thickbox handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/ctcl-phone-pay/ctcl-phone-pay.php:375

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Admin Panel), #2 (Customer facing display), #3 (Order and info display)
The official readme.txt is a good inspiration

ctcl-phone-pay/ctcl-phone-pay.php Passed 13 tests

"CTCL Phone Pay" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
40 characters long description:
CT commerce lite phone pay payment addon

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin408 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP16090235
JavaScript23818136
CSS212037

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.22MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png145.42KB45.01KB▼ 69.05%
screenshot-2.png38.95KB12.80KB▼ 67.13%
screenshot-1.png39.70KB11.79KB▼ 70.31%