83% small-package-quotes-usps-edition

Code Review | Small Package Quotes - USPS Edition

WordPress plugin Small Package Quotes - USPS Edition scored83%from 54 tests.

About plugin

  • Plugin page: small-package-quo...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2022
  • Latest release: Nov 14, 2023
  • Number of updates: 13
  • Update frequency: every 32.2 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /732 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.09MB] [CPU: ▼6.16ms] Passed 4 tests

Analyzing server-side resources used by Small Package Quotes - USPS Edition
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0937.50 ▼4.64
Dashboard /wp-admin3.39 ▲0.0852.51 ▲3.61
Posts /wp-admin/edit.php3.51 ▲0.1548.75 ▼0.28
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.01 ▼21.90
Media Library /wp-admin/upload.php3.32 ▲0.0836.51 ▲2.19

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 68 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Small Package Quotes - USPS Edition
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲4914.67 ▲0.421.68 ▼0.2041.50 ▼1.65
Dashboard /wp-admin2,204 ▲245.62 ▲0.0986.50 ▼2.8941.07 ▲2.56
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0839.51 ▼1.7637.44 ▲1.60
Add New Post /wp-admin/post-new.php1,533 ▲823.20 ▼0.50640.15 ▼21.5148.08 ▼1.04
Media Library /wp-admin/upload.php1,406 ▲34.18 ▲0.0097.10 ▼7.0840.51 ▼5.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/small-package-quotes-usps-edition/admin/tab/en-tab.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/small-package-quotes-usps-edition/en-install.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
You can look at the official readme.txt

small-package-quotes-usps-edition/small-package-quotes-usps-edition.php 85% from 13 tests

The entry point to "Small Package Quotes - USPS Edition" version 1.1.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("6.2" instead of "6.4")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin7,377 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP471,0101,5085,161
JavaScript53084161,563
CSS311230636
JSON20017

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity19.23
▷ Minimum class complexity1.00
▷ Maximum class complexity126.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces34
Interfaces0
Traits0
Classes40
▷ Abstract classes00.00%
▷ Concrete classes40100.00%
▷ Final classes00.00%
Methods204
▷ Static methods10049.02%
▷ Public methods20198.53%
▷ Protected methods00.00%
▷ Private methods31.47%
Functions31
▷ Named functions2890.32%
▷ Anonymous functions39.68%
Constants56
▷ Global constants56100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/tab/location/assets/images/delete.png3.49KB0.86KB▼ 75.41%
admin/tab/location/assets/images/edit.png3.09KB0.70KB▼ 77.43%