83% wc-easypay-pk

Code Review | WC Easypay pk

WordPress plugin WC Easypay pk scored83%from 54 tests.

About plugin

  • Plugin page: wc-easypay-pk
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2017
  • Latest release: Dec 30, 2022
  • Number of updates: 27
  • Update frequency: every 78.0 days
  • Top authors: Ali Kazim (92.59%)ahmedabbas90 (11.11%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /15,001 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by WC Easypay pk
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.50 ▼0.41
Dashboard /wp-admin3.31 ▲0.0144.57 ▼3.18
Posts /wp-admin/edit.php3.37 ▲0.0148.48 ▲1.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.49 ▲3.39
Media Library /wp-admin/upload.php3.24 ▲0.0134.25 ▲2.71

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WC Easypay pk
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.461.68 ▼0.1644.21 ▼2.21
Dashboard /wp-admin2,206 ▲155.91 ▲0.81102.29 ▼15.6941.36 ▼1.38
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0739.23 ▲2.1335.77 ▲3.14
Add New Post /wp-admin/post-new.php1,542 ▲2218.48 ▼4.60600.59 ▼55.5159.91 ▲14.99
Media Library /wp-admin/upload.php1,391 ▼04.20 ▲0.0596.67 ▼0.7842.69 ▼0.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-easypay-pk/main.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === wc-easypay-pk === )
The official readme.txt is a good inspiration

wc-easypay-pk/main.php 85% from 13 tests

This is the main PHP file of "WC Easypay pk" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-easypay-pk.php" instead of "main.php")

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
No dangerous file extensions were detected248 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27194248

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
There were not PNG files found in your plugin