89% woo-p2m-online

Code Review | P2M Pay

WordPress plugin P2M Pay scored89%from 54 tests.

About plugin

  • Plugin page: woo-p2m-online
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.1.1
  • WordPress version: 6.3.1
  • First release: Oct 5, 2018
  • Latest release: May 24, 2019
  • Number of updates: 8
  • Update frequency: every 29.6 days
  • Top authors: dreddyi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,656 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.10ms] Passed 4 tests

An overview of server-side resources used by P2M Pay
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.73 ▲3.52
Dashboard /wp-admin3.37 ▲0.0743.75 ▼2.03
Posts /wp-admin/edit.php3.42 ▲0.0745.75 ▲0.08
Add New Post /wp-admin/post-new.php5.95 ▲0.0787.93 ▼12.28
Media Library /wp-admin/upload.php3.29 ▲0.0734.90 ▲1.83

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

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

Browser metrics Passed 4 tests

Checking browser requirements for P2M Pay
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.19 ▼1.042.01 ▲0.4741.92 ▼0.25
Dashboard /wp-admin2,206 ▲185.78 ▼0.0795.47 ▼6.1340.19 ▼4.05
Posts /wp-admin/edit.php2,068 ▼211.98 ▼0.0135.01 ▼2.0033.72 ▼0.64
Add New Post /wp-admin/post-new.php1,533 ▲1423.05 ▼0.12621.77 ▲14.9956.23 ▲5.00
Media Library /wp-admin/upload.php1,385 ▼64.21 ▼0.0292.73 ▼9.5142.23 ▼1.53

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Contributors: Contributors not specified
You can take inspiration from this readme.txt

woo-p2m-online/wc-p2monline.php 92% from 13 tests

"P2M Pay" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-p2m-online.php" instead of "wc-p2monline.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin347 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13796346
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods872.73%
▷ Protected methods00.00%
▷ Private methods327.27%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin