83% ozpost-multiquote

Code Review | WooCommerce-Ozpost

WordPress plugin WooCommerce-Ozpost scored83%from 54 tests.

About plugin

  • Plugin page: ozpost-multiquote
  • Plugin version: 2.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.4.1
  • WordPress version: 6.3.1
  • First release: May 26, 2015
  • Latest release: Jun 5, 2020
  • Number of updates: 482
  • Update frequency: every 3.8 days
  • Top authors: Rod_G (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /10,590 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼7.48ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce-Ozpost
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2845.26 ▲4.11
Dashboard /wp-admin3.58 ▲0.2450.94 ▼14.85
Posts /wp-admin/edit.php3.63 ▲0.2853.36 ▲5.03
Add New Post /wp-admin/post-new.php6.16 ▲0.2883.09 ▼17.38
Media Library /wp-admin/upload.php3.50 ▲0.2836.32 ▼1.80

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce-Ozpost
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.221.60 ▲0.0344.57 ▲7.81
Dashboard /wp-admin2,192 ▲155.56 ▼0.1181.12 ▼18.4534.23 ▼8.11
Posts /wp-admin/edit.php2,097 ▼62.00 ▲0.0233.19 ▼13.9235.94 ▼10.16
Add New Post /wp-admin/post-new.php1,526 ▼023.31 ▲0.22667.61 ▼10.2762.02 ▲6.42
Media Library /wp-admin/upload.php1,403 ▲64.17 ▼0.0291.94 ▼8.4141.21 ▼3.05

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ozpost-multiquote/formfields.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

ozpost-multiquote/wc-shipping-ozpost.php 92% from 13 tests

The main file in "WooCommerce-Ozpost" v. 2.2.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ozpost-multiquote.php" instead of "wc-shipping-ozpost.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected3,441 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22762073,441

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 554)
Cyclomatic complexity
Average complexity per logical line of code0.84
Average class complexity652.00
▷ Minimum class complexity652.00
▷ Maximum class complexity652.00
Average method complexity51.08
▷ Minimum method complexity1.00
▷ Maximum method complexity554.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods538.46%
▷ Protected methods00.00%
▷ Private methods861.54%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin