68% mediopay

Code Review | Plugin Name: MedioPay

WordPress plugin Plugin Name: MedioPay scored68%from 54 tests.

About plugin

  • Plugin page: mediopay
  • Plugin version: 1.9
  • PHP compatiblity: 6.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3.2
  • WordPress version: 6.3.1
  • First release: Nov 8, 2019
  • Latest release: Apr 4, 2020
  • Number of updates: 65
  • Update frequency: every 2.3 days
  • Top authors: cbergmann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,606 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.67MB] [CPU: ▼10.26ms] Passed 4 tests

An overview of server-side resources used by Plugin Name: MedioPay
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.42 ▲5.53
Dashboard /wp-admin3.32 ▲0.0250.14 ▼3.32
Posts /wp-admin/edit.php3.37 ▲0.0250.72 ▼4.93
Add New Post /wp-admin/post-new.php3.17 ▼2.7164.20 ▼31.26
Media Library /wp-admin/upload.php3.24 ▲0.0233.07 ▼1.52
mediopay /wp-admin/options-general.php?page=mediopay3.2135.17

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 24 new files
Database: 2 new tables, 7 new options
New tables
wp_mediopay_paidcontent
wp_mediopay
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
mediopay_option_name
db_upgraded

Browser metrics Passed 4 tests

Plugin Name: MedioPay: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15414.95 ▲0.8333.75 ▲31.6843.18 ▼4.16
Dashboard /wp-admin2,199 ▲195.63 ▼0.0289.93 ▲2.8836.01 ▼0.64
Posts /wp-admin/edit.php2,104 ▲42.03 ▼0.1139.50 ▼0.3634.83 ▲1.02
Add New Post /wp-admin/post-new.php6,730 ▲5,20422.17 ▼1.12982.88 ▲341.07101.54 ▲37.71
Media Library /wp-admin/upload.php1,401 ▲74.19 ▲0.00102.69 ▲6.4545.90 ▲3.59
mediopay /wp-admin/options-general.php?page=mediopay1,4251.9922.6633.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_mediopay_paidcontent
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • mediopay_option_name

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mediopay/functions/mp_api_functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/mediopay/mediopay.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=mediopay
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=mediopay 184 The specified value "FB9868" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=mediopay
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=mediopay 195 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #14, #15, #2, #3, #4, #5, #6, #7, #8, #9 in mediopay/assets to your readme.txt
  • Donate link: Invalid url: "---"
The official readme.txt is a good inspiration

mediopay/mediopay.php 92% from 13 tests

The principal PHP file in "Plugin Name: MedioPay" v. 1.9 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires PHP: Required version does not match the one declared in readme.txt ("6.3" instead of "6.2")

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
There were no executable files found in this plugin6,194 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP72682383,279
JavaScript91323492,569
CSS28956346

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions40
▷ Named functions3690.00%
▷ Anonymous functions410.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
2 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/questionmark-white.png53.51KB21.42KB▼ 59.98%
lib/questionmark.png29.93KB21.42KB▼ 28.45%