62% payolee-accept-website-payments-for-wp

Code Review | Payolee Website Payments for WP

WordPress plugin Payolee Website Payments for WP scored62%from 54 tests.

About plugin

  • Plugin page: payolee-accept-we...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Jun 18, 2016
  • Latest release: Sep 6, 2016
  • Number of updates: 9
  • Update frequency: every 9.0 days
  • Top authors: payolee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /659 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼39.11ms] Passed 4 tests

Analyzing server-side resources used by Payolee Website Payments for WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.34 ▼0.60
Dashboard /wp-admin3.00 ▼0.3424.39 ▼43.40
Posts /wp-admin/edit.php3.00 ▼0.3524.42 ▼27.92
Add New Post /wp-admin/post-new.php3.00 ▼2.8825.68 ▼77.15
Media Library /wp-admin/upload.php3.00 ▼0.2328.44 ▼7.98
Payolee /wp-admin/tools.php?page=payolee-accept-website-payments-for-wp/payolee-wp-shortcode.php3.0025.51

Server storage [IO: ▲0.25MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/payolee-accept-website-payments-for-wp/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Payolee Website Payments for WP: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.25 ▼1.334.75 ▲2.8543.71 ▼1.71
Dashboard /wp-admin2,225 ▲255.83 ▲0.94107.22 ▲2.1542.15 ▲2.04
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0238.86 ▲0.7535.87 ▲2.67
Add New Post /wp-admin/post-new.php1,548 ▲1723.19 ▼0.09645.51 ▼49.5855.62 ▼9.44
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.09108.86 ▼4.0246.43 ▲0.83
Payolee /wp-admin/tools.php?page=payolee-accept-website-payments-for-wp/payolee-wp-shortcode.php8852.0123.7928.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/tools.php?page=payolee-accept-website-payments-for-wp/payolee-wp-shortcode.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% 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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/payolee-accept-website-payments-for-wp/payolee-wp-shortcode.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/payolee-accept-website-payments-for-wp/page.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/payolee-accept-website-payments-for-wp/shortcodes.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Too many tags (30 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Add images for these screenshots: #1 (Copy the shortcode for the payment form from your Payolee account.), #2 (Paste the shortcode into the Text or Visual editor area of your Wordpress admin.), #3 (The form will embed in that page or post.), #4 (The Button example on that page or post.)
The official readme.txt might help

payolee-accept-website-payments-for-wp/payolee-wp-shortcode.php 92% from 13 tests

The entry point to "Payolee Website Payments for WP" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payolee-accept-website-payments-for-wp.php" instead of "payolee-wp-shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected88 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3353988

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.21MB with 0.14MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png60.70KB20.55KB▼ 66.15%
screenshot-3.png69.21KB22.77KB▼ 67.10%
screenshot-2.png50.25KB15.99KB▼ 68.19%
screenshot-1.png29.96KB10.24KB▼ 65.82%