10% mediapay-micropaiement

Code Review | YD Media-Pay WP Plugin

WordPress plugin YD Media-Pay WP Plugin scored10%from 54 tests.

About plugin

  • Plugin page: mediapay-micropai...
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 26, 2013
  • Latest release: Apr 30, 2013
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: ydubois (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,651 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Parse error in wp-content/plugins/mediapay-micropaiement/inc/yd-widget-framework.inc.php+200
    syntax error, unexpected '&'

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.67ms] Passed 4 tests

A check of server-side resources used by YD Media-Pay WP Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.31 ▼4.62
Dashboard /wp-admin3.31 ▲0.0043.51 ▼13.34
Posts /wp-admin/edit.php3.36 ▲0.0048.09 ▼2.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.04 ▼10.19
Media Library /wp-admin/upload.php3.23 ▲0.0032.04 ▼1.97

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 262 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for YD Media-Pay WP Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.55 ▼1.204.32 ▲2.5739.87 ▲2.13
Dashboard /wp-admin2,209 ▲215.86 ▼0.0098.92 ▼4.7739.64 ▼2.40
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0142.13 ▼0.2734.40 ▼0.35
Add New Post /wp-admin/post-new.php1,542 ▼018.41 ▲0.03607.82 ▼9.6854.30 ▲6.24
Media Library /wp-admin/upload.php1,391 ▲64.21 ▼0.0497.52 ▼5.2240.69 ▼6.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% 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)
Good news, no errors were detected

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 take a closer look at the following
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_remote_retrieve_body() in wp-content/plugins/mediapay-micropaiement/inc/mediapay-validate-api.php:18
    • > PHP Parse error
      syntax error, unexpected '&' in wp-content/plugins/mediapay-micropaiement/inc/mediapay.inc.php on line 424
    • > PHP Notice
      Undefined variable: debug in wp-content/plugins/mediapay-micropaiement/inc/mediapay-phonenumber-api.inc.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/mediapay-micropaiement/inc/display-settings.inc.php:9
    • > PHP Notice
      Undefined variable: debug in wp-content/plugins/mediapay-micropaiement/inc/mediapay-validate-api.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_remote_retrieve_body() in wp-content/plugins/mediapay-micropaiement/inc/mediapay-phonenumber-api.inc.php:24
    • > PHP Parse error
      syntax error, unexpected '&' in wp-content/plugins/mediapay-micropaiement/inc/yd-widget-framework.inc.php on line 200
    • > PHP Parse error
      syntax error, unexpected '&' in wp-content/plugins/mediapay-micropaiement/inc/yd-widget-framework.inc.php on line 200

User-side errors Passed 1 test

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

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 to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
Please take inspiration from this readme.txt

mediapay-micropaiement/yd-mediapay-wp-plugin.php 85% from 13 tests

The main PHP file in "YD Media-Pay WP Plugin" ver. 0.1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mediapay-micropaiement.php" instead of "yd-mediapay-wp-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,509 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP71602331,319
PO File24762116
CSS116174

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity39.75
▷ Minimum class complexity6.00
▷ Maximum class complexity82.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods51
▷ Static methods00.00%
▷ Public methods4384.31%
▷ Protected methods00.00%
▷ Private methods815.69%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin