74% freight-shipping-quote

Code Review | Freight Shipping Quote

WordPress plugin Freight Shipping Quote scored74%from 54 tests.

About plugin

  • Plugin page: freight-shipping-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 27, 2023
  • Latest release: Dec 2, 2023
  • Number of updates: 7
  • Update frequency: every 0.9 days
  • Top authors: repon.wp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /33 total downloads

Benchmarks

Plugin footprint 65% 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.35MB] [CPU: ▼5.87ms] Passed 4 tests

Server-side resources used by Freight Shipping Quote
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4037.31 ▼8.42
Dashboard /wp-admin3.70 ▲0.3647.23 ▼15.15
Posts /wp-admin/edit.php3.75 ▲0.4051.76 ▲1.69
Add New Post /wp-admin/post-new.php6.22 ▲0.3396.57 ▼1.61
Media Library /wp-admin/upload.php3.56 ▲0.3339.78 ▲6.85

Server storage [IO: ▲0.31MB] [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: 54 new files
Database: 1 new table, 6 new options
New tables
wp_freight_shipping_quotes
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Freight Shipping Quote: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7814.32 ▼0.031.57 ▼0.1837.63 ▼5.82
Dashboard /wp-admin2,227 ▲495.53 ▼0.10103.63 ▼8.5346.53 ▲5.46
Posts /wp-admin/edit.php2,138 ▲382.15 ▲0.1341.75 ▲5.6535.42 ▲3.05
Add New Post /wp-admin/post-new.php1,561 ▲3523.18 ▲0.07670.53 ▼49.1744.26 ▼10.97
Media Library /wp-admin/upload.php1,429 ▲264.16 ▼0.1097.91 ▲1.6441.65 ▼0.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_freight_shipping_quotes
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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 | 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(wp-content/plugins/freight-shipping-quote/vendor/appsero/client/vendor/tareq1988/wp-php-cs-fixer/loader.php): failed to open stream: No such file or directory in wp-content/plugins/freight-shipping-quote/vendor/appsero/client/.php-cs-fixer.dist.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/freight-shipping-quote/vendor/appsero/client/vendor/tareq1988/wp-php-cs-fixer/loader.php' (include_path='.:/usr/share/php') in wp-content/plugins/freight-shipping-quote/vendor/appsero/client/.php-cs-fixer.dist.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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: Please take inspiration from this readme.txt

freight-shipping-quote/freight-shipping-quote.php 92% from 13 tests

The main PHP script in "Freight Shipping Quote" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.6" instead of "5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin4,756 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP341,0541,7423,905
Markdown1820255
CSS4470232
JavaScript4270110
JSON200108
XML161195
YAML16032
SVG20019

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity21.33
▷ Minimum class complexity1.00
▷ Maximum class complexity84.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes419.05%
Methods225
▷ Static methods2812.44%
▷ Public methods18984.00%
▷ Protected methods62.67%
▷ Private methods3013.33%
Functions16
▷ Named functions637.50%
▷ Anonymous functions1062.50%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin