84% nationwide-auto-transportation-quote-calculator

Code Review | Nationwide Auto-Transportation Quote Calculator

WordPress plugin Nationwide Auto-Transportation Quote Calculator scored84%from 54 tests.

About plugin

  • Plugin page: nationwide-auto-t...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.0-4.8
  • WordPress version: 6.3.1
  • First release: Aug 3, 2017
  • Latest release: Jan 23, 2018
  • Number of updates: 22
  • Update frequency: every 7.9 days
  • Top authors: nationwideautotransport (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,446 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.46ms] Passed 4 tests

An overview of server-side resources used by Nationwide Auto-Transportation Quote Calculator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.47 ▼4.73
Dashboard /wp-admin3.31 ▲0.0151.13 ▼0.13
Posts /wp-admin/edit.php3.36 ▲0.0051.29 ▲0.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.12 ▼9.21
Media Library /wp-admin/upload.php3.23 ▲0.0040.19 ▲4.62

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Nationwide Auto-Transportation Quote Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.28 ▼1.101.68 ▼1.4844.44 ▼1.15
Dashboard /wp-admin2,209 ▲214.89 ▼0.13109.97 ▼8.8971.96 ▲24.62
Posts /wp-admin/edit.php2,110 ▲211.97 ▼0.0438.37 ▲2.3434.97 ▼0.18
Add New Post /wp-admin/post-new.php1,531 ▲1222.98 ▼0.37753.02 ▲57.5656.57 ▼3.74
Media Library /wp-admin/upload.php1,397 ▲94.23 ▼0.05100.06 ▼6.1566.75 ▲22.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nationwide-auto-transportation-quote-calculator/functions.php:463
    • > PHP Fatal error
      Uncaught Error: Call to undefined function nat_qc_registerCalculatorAssets() in wp-content/plugins/nationwide-auto-transportation-quote-calculator/calculator.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/nationwide-auto-transportation-quote-calculator/nat-quote-calculator.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
These attributes need to be fixed:
  • Contributors: The plugin contributors field is missing
You can look at the official readme.txt

nationwide-auto-transportation-quote-calculator/nat-quote-calculator.php 92% from 13 tests

The main file in "Nationwide Auto-Transportation Quote Calculator" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nationwide-auto-transportation-quote-calculator.php" instead of "nat-quote-calculator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin2,062 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS58021716
PHP313556695
JavaScript311238651

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
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
img/qc-icon.png0.94KB0.93KB▼ 0.62%
img/nat-logo.png7.63KB4.04KB▼ 47.12%