83% recurring-shipping-classes

Code Review | Recurring Shipping Classes

WordPress plugin Recurring Shipping Classes scored83%from 54 tests.

About plugin

  • Plugin page: recurring-shippin...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: May 27, 2020
  • Latest release: May 27, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Mcurly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /426 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.52ms] Passed 4 tests

A check of server-side resources used by Recurring Shipping Classes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.79 ▼2.86
Dashboard /wp-admin3.32 ▲0.0246.01 ▼4.66
Posts /wp-admin/edit.php3.38 ▲0.0244.98 ▼5.14
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.36 ▼1.08
Media Library /wp-admin/upload.php3.25 ▲0.0234.21 ▼1.41

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Recurring Shipping Classes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.164.37 ▲2.6438.83 ▼5.17
Dashboard /wp-admin2,209 ▲215.86 ▲0.9799.73 ▼10.0942.94 ▼0.46
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0440.38 ▼2.5035.08 ▼2.84
Add New Post /wp-admin/post-new.php1,533 ▼722.87 ▲4.69585.41 ▼28.8852.70 ▼8.80
Media Library /wp-admin/upload.php1,391 ▲64.24 ▲0.0894.97 ▼3.8643.90 ▼0.90

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
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/recurring-shipping-classes/public/partials/shipping-dates-public-display.php
    • > /wp-content/plugins/recurring-shipping-classes/admin/partials/shipping-dates-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Recurring Shipping Classes : Settings)
You can look at the official readme.txt

recurring-shipping-classes/shipping-dates.php 85% from 13 tests

"Recurring Shipping Classes" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("recurring-shipping-classes.php" instead of "shipping-dates.php")

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
There were no executable files found in this plugin355 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12165529292
PO File18832
JavaScript283228
CSS2043

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.29
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png31.16KB15.34KB▼ 50.78%