84% woocommerce-nigeria-states

Code Review | WooCommerce Nigeria States

WordPress plugin WooCommerce Nigeria States scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-niger...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6.1
  • WordPress version: 6.3.1
  • First release: Jan 21, 2014
  • Latest release: Sep 27, 2016
  • Number of updates: 29
  • Update frequency: every 33.9 days
  • Top authors: alexasomba (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /3,834 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.01MB] [CPU: ▼7.40ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Nigeria States
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.32 ▲4.60
Dashboard /wp-admin3.31 ▼0.0448.19 ▼14.51
Posts /wp-admin/edit.php3.36 ▲0.0050.71 ▼5.99
Add New Post /wp-admin/post-new.php5.89 ▲0.00102.27 ▼8.47
Media Library /wp-admin/upload.php3.23 ▲0.0038.20 ▼0.61

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Nigeria States
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.27 ▼0.071.83 ▼0.5542.89 ▼1.02
Dashboard /wp-admin2,186 ▲65.63 ▲0.0492.90 ▼0.3543.37 ▲2.58
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0739.17 ▼3.3236.59 ▼1.75
Add New Post /wp-admin/post-new.php1,526 ▼1122.90 ▲4.62621.47 ▼21.7553.39 ▼6.41
Media Library /wp-admin/upload.php1,403 ▲64.23 ▲0.0399.12 ▼0.8247.41 ▲1.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woocommerce-nigeria-states/woocommerce-nigeria-states.php:79

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: ecommerce, nigeria, plugin, woocommerce, address...

woocommerce-nigeria-states/woocommerce-nigeria-states.php 92% from 13 tests

"WooCommerce Nigeria States" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin44 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP133244

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin