78% progress-bar-ecpay-gateway

Code Review | Progress Bar ECPay

WordPress plugin Progress Bar ECPay scored 78% from 54 tests.

About plugin

  • Plugin page: progress-bar-ecpa...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Oct 21, 2020
  • Latest release: Oct 23, 2020
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: progressbartw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 517 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
Install script ran successfully

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

A check of server-side resources used by Progress Bar ECPay
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.77 ▲1.20
Dashboard /wp-admin3.32 ▲0.0246.77 ▼3.43
Posts /wp-admin/edit.php3.37 ▲0.0148.07 ▲0.67
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.70 ▼13.99
Media Library /wp-admin/upload.php3.24 ▲0.0135.86 ▼1.00

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Progress Bar ECPay
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.76 ▲0.391.73 ▼0.0837.77 ▼3.74
Dashboard /wp-admin2,206 ▲185.85 ▼0.05104.39 ▼0.9038.28 ▼2.69
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0536.28 ▲0.0738.57 ▲8.03
Add New Post /wp-admin/post-new.php1,544 ▲2418.60 ▼4.55621.15 ▼7.0446.73 ▼4.34
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0197.69 ▼11.8642.61 ▼2.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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 0% 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
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/progress-bar-ecpay-gateway/view/compoments/hr_in_form.php
    • > /wp-content/plugins/progress-bar-ecpay-gateway/view/admin/ecpay_detail_meta.php
    • > /wp-content/plugins/progress-bar-ecpay-gateway/view/ecpay_form.php
    • > /wp-content/plugins/progress-bar-ecpay-gateway/view/compoments/multiple_checkable_input_in_form.php
    • > /wp-content/plugins/progress-bar-ecpay-gateway/view/compoments/locked_text_input_in_form.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/progress-bar-ecpay-gateway/view/compoments/multiple_checkable_input_in_form.php on line 13
    • > PHP Notice
      Undefined variable: responsed_metadata in wp-content/plugins/progress-bar-ecpay-gateway/view/admin/ecpay_detail_meta.php on line 25
    • > PHP Notice
      Undefined variable: aioUrl in wp-content/plugins/progress-bar-ecpay-gateway/view/ecpay_form.php on line 4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/progress-bar-ecpay-gateway/view/compoments/multiple_checkable_input_in_form.php on line 13
    • > PHP Notice
      Undefined variable: metadata in wp-content/plugins/progress-bar-ecpay-gateway/view/ecpay_form.php on line 6
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/progress-bar-ecpay-gateway/view/ecpay_form.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/progress-bar-ecpay-gateway/view/admin/ecpay_detail_meta.php on line 13
    • > PHP Notice
      Undefined variable: metadata in wp-content/plugins/progress-bar-ecpay-gateway/view/admin/ecpay_detail_meta.php on line 17
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/progress-bar-ecpay-gateway/view/admin/ecpay_detail_meta.php on line 25
    • > PHP Notice
      Undefined variable: metadata in wp-content/plugins/progress-bar-ecpay-gateway/view/admin/ecpay_detail_meta.php on line 13

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

progress-bar-ecpay-gateway/progressbar-ecpay-for-woocommerce.php 92% from 13 tests

The principal PHP file in "Progress Bar ECPay" v. 1.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("progress-bar-ecpay-gateway.php" instead of "progressbar-ecpay-for-woocommerce.php")

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
No dangerous file extensions were detected652 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP98530553
PO File138399

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.67
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods1864.29%
▷ Protected methods00.00%
▷ Private methods1035.71%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants5
▷ Global constants5100.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
No PNG files were detected