84% wanderlust-oca-e-pak-shipping-rates

Code Review | Wanderlust OCA Shipping

WordPress plugin Wanderlust OCA Shipping scored84%from 54 tests.

About plugin

  • Plugin page: wanderlust-oca-e-...
  • Plugin version: 1.1.993
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Nov 8, 2023
  • Number of updates: 95
  • Update frequency: every 31.4 days
  • Top authors: ConradoGalli (97.89%)wanderlustcodes (3.16%)

Code review

54 tests

User reviews

54 reviews

Install metrics

1,000+ active /30,247 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.90ms] Passed 4 tests

An overview of server-side resources used by Wanderlust OCA Shipping
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0642.82 ▼0.33
Dashboard /wp-admin3.36 ▲0.0647.91 ▼3.04
Posts /wp-admin/edit.php3.42 ▲0.0544.15 ▼5.65
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.70 ▼2.58
Media Library /wp-admin/upload.php3.29 ▲0.0536.00 ▲2.52

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Wanderlust OCA Shipping
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,782 ▲2014.65 ▲0.371.12 ▼0.6846.48 ▲2.42
Dashboard /wp-admin2,195 ▲185.62 ▲0.1088.79 ▼12.6043.16 ▼1.11
Posts /wp-admin/edit.php2,100 ▼02.09 ▲0.1236.58 ▼1.3631.64 ▼3.43
Add New Post /wp-admin/post-new.php1,535 ▼025.03 ▲2.22637.87 ▼38.7474.25 ▲6.58
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.12100.27 ▼8.1642.57 ▼0.99

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wanderlust-oca-e-pak-shipping-rates/includes/functions.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wanderlust-oca-e-pak-shipping-rates/wanderlust-oca-shipping.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wanderlust-oca-e-pak-shipping-rates/includes/data/services.php:2

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: shipping, oca, woocommerce, rates

wanderlust-oca-e-pak-shipping-rates/wanderlust-oca-shipping.php 92% from 13 tests

The entry point to "Wanderlust OCA Shipping" version 1.1.993 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wanderlust-oca-e-pak-shipping-rates.php" instead of "wanderlust-oca-shipping.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,417 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP93104031,417

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity26.00
▷ Minimum class complexity3.00
▷ Maximum class complexity38.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods55
▷ Static methods00.00%
▷ Public methods4989.09%
▷ Protected methods00.00%
▷ Private methods610.91%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/img/suc-oca.png4.52KB2.67KB▼ 40.96%