84% gateway-payping-easy-digital-downloads

Code Review | Gateway PayPing Easy Digital Downloads

WordPress plugin Gateway PayPing Easy Digital Downloads scored84%from 54 tests.

About plugin

  • Plugin page: gateway-payping-e...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 25, 2019
  • Latest release: Jan 22, 2022
  • Number of updates: 7
  • Update frequency: every 143.4 days
  • Top authors: payping (85.71%)mashhadcode (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.48ms] Passed 4 tests

An overview of server-side resources used by Gateway PayPing Easy Digital Downloads
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.56 ▼2.49
Dashboard /wp-admin3.38 ▲0.0352.79 ▼16.61
Posts /wp-admin/edit.php3.43 ▲0.0749.95 ▼1.84
Add New Post /wp-admin/post-new.php5.96 ▲0.0794.49 ▼0.94
Media Library /wp-admin/upload.php3.30 ▲0.0737.47 ▼4.97

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Gateway PayPing Easy Digital Downloads
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.131.64 ▼0.0844.16 ▼0.98
Dashboard /wp-admin2,198 ▲185.50 ▼0.1894.42 ▲3.3040.50 ▼1.32
Posts /wp-admin/edit.php2,103 ▼01.98 ▲0.0341.19 ▲0.7535.03 ▼1.72
Add New Post /wp-admin/post-new.php1,534 ▼318.21 ▼0.14617.59 ▼47.8272.22 ▲5.68
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0399.71 ▲3.4544.98 ▲0.35

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gateway-payping-easy-digital-downloads/includes/toman-currency.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gateway-payping-easy-digital-downloads/edd-payping.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: edd, payping, payment, gateway, easy digital downloads...

gateway-payping-easy-digital-downloads/edd-payping.php 92% from 13 tests

The main file in "Gateway PayPing Easy Digital Downloads" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gateway-payping-easy-digital-downloads.php" instead of "edd-payping.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
Good job! No executable or dangerous file extensions detected306 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36245306

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin