89% show-paybright-mdp

Code Review | Show PayBright MDP

WordPress plugin Show PayBright MDP scored89%from 54 tests.

About plugin

  • Plugin page: show-paybright-mdp
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.7.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2021
  • Latest release: May 1, 2021
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: mouttahid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /298 total downloads

Benchmarks

Plugin footprint 83% 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.02MB] [CPU: ▼5.95ms] Passed 4 tests

Server-side resources used by Show PayBright MDP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.81 ▼2.91
Dashboard /wp-admin3.33 ▲0.0242.98 ▼8.45
Posts /wp-admin/edit.php3.38 ▲0.0245.64 ▲1.30
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.36 ▼10.69
Media Library /wp-admin/upload.php3.25 ▲0.0231.99 ▼1.75

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Show PayBright MDP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.21 ▼1.241.80 ▼0.0443.87 ▼0.87
Dashboard /wp-admin2,206 ▲184.86 ▼0.00108.72 ▼6.6641.72 ▼4.02
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0638.70 ▲2.6335.68 ▲1.19
Add New Post /wp-admin/post-new.php1,514 ▼517.70 ▼5.67674.69 ▼11.0555.32 ▲1.18
Media Library /wp-admin/upload.php1,388 ▼04.43 ▲0.2795.67 ▼11.0843.52 ▼3.31

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #3 (on single product page) image not found
The official readme.txt might help

show-paybright-mdp/show-paybright.php 92% from 13 tests

The principal PHP file in "Show PayBright MDP" v. 2.1.0 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 ("show-paybright-mdp.php" instead of "show-paybright.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin83 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3241457
CSS10026

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.23
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/paybright.png10.17KB6.00KB▼ 40.94%