84% wpsso-merchant-return-policy

Code Review | WPSSO Merchant Return Policy Manager

WordPress plugin WPSSO Merchant Return Policy Manager scored84%from 54 tests.

About plugin

  • Plugin page: wpsso-merchant-re...
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.2.34+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2023
  • Latest release: Nov 20, 2023
  • Number of updates: 102
  • Update frequency: every 1.6 days
  • Top authors: jsmoriss (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,225 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.86ms] Passed 4 tests

An overview of server-side resources used by WPSSO Merchant Return Policy Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1438.99 ▼0.66
Dashboard /wp-admin3.44 ▲0.0946.95 ▼16.66
Posts /wp-admin/edit.php3.55 ▲0.2045.38 ▼0.47
Add New Post /wp-admin/post-new.php6.02 ▲0.1390.95 ▼7.72
Media Library /wp-admin/upload.php3.36 ▲0.1332.39 ▼2.40

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPSSO Merchant Return Policy Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.28 ▼0.041.86 ▲0.1644.30 ▲0.83
Dashboard /wp-admin2,201 ▲265.55 ▼0.1890.69 ▼24.7143.37 ▼0.67
Posts /wp-admin/edit.php2,109 ▲61.95 ▼0.0138.23 ▼2.1934.05 ▼1.91
Add New Post /wp-admin/post-new.php1,534 ▲523.16 ▼0.04677.40 ▲64.3550.75 ▼4.40
Media Library /wp-admin/upload.php1,409 ▲94.12 ▼0.0796.40 ▲1.4742.89 ▲0.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 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 50% 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
Almost there! Just fix the following items
  • 13× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/wpsso-merchant-return-policy/lib/mrp.php
    • > /wp-content/plugins/wpsso-merchant-return-policy/gettext/gettext-lib-abstract-com.php
    • > /wp-content/plugins/wpsso-merchant-return-policy/lib/abstract/com/add-on.php
    • > /wp-content/plugins/wpsso-merchant-return-policy/lib/register.php
    • > /wp-content/plugins/wpsso-merchant-return-policy/lib/abstract/add-on.php
    • > /wp-content/plugins/wpsso-merchant-return-policy/lib/filters-edit.php
    • > /wp-content/plugins/wpsso-merchant-return-policy/wpsso-merchant-return-policy.php
    • > /wp-content/plugins/wpsso-merchant-return-policy/lib/filters-options.php
    • > /wp-content/plugins/wpsso-merchant-return-policy/lib/config.php
    • > /wp-content/plugins/wpsso-merchant-return-policy/gettext/gettext-lib-config.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: schema, product, return policy, hasmerchantreturnpolicy, merchant...

wpsso-merchant-return-policy/wpsso-merchant-return-policy.php Passed 13 tests

"WPSSO Merchant Return Policy Manager" version 2.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
75 characters long description:
Manage any number of Merchant Return Policies for Google Merchant listings.

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
No dangerous file extensions were detected1,220 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13485232954
PO File18383201
Markdown116036
HTML231029

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity12.55
▷ Minimum class complexity2.00
▷ Maximum class complexity39.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes218.18%
▷ Concrete classes981.82%
▷ Final classes00.00%
Methods58
▷ Static methods1525.86%
▷ Public methods4984.48%
▷ Protected methods46.90%
▷ Private methods58.62%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants8100.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.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-256x256.png52.60KB19.38KB▼ 63.15%
images/icon-128x128.png19.45KB7.39KB▼ 62.01%