84% all-countries-counties-for-wc

Code Review | All Countries Counties For WooCommerce

WordPress plugin All Countries Counties For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: all-countries-cou...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.1.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2016
  • Latest release: Mar 19, 2019
  • Number of updates: 33
  • Update frequency: every 30.6 days
  • Top authors: hoshomoh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,856 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲1.19ms] Passed 4 tests

Server-side resources used by All Countries Counties For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.19 ▼6.29
Dashboard /wp-admin3.31 ▲0.0154.11 ▲5.11
Posts /wp-admin/edit.php3.36 ▲0.0149.75 ▲6.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0197.31 ▲7.11
Media Library /wp-admin/upload.php3.23 ▲0.0033.92 ▼0.37

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

All Countries Counties For WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.16 ▼1.521.52 ▼0.3742.45 ▼9.59
Dashboard /wp-admin2,212 ▲245.88 ▲0.84107.24 ▼1.9439.14 ▼6.37
Posts /wp-admin/edit.php2,098 ▲92.15 ▲0.1239.65 ▲2.7735.66 ▼3.82
Add New Post /wp-admin/post-new.php1,548 ▲618.14 ▼0.01604.85 ▼9.5356.94 ▲1.75
Media Library /wp-admin/upload.php1,397 ▲124.24 ▼0.0096.90 ▼4.7647.78 ▲5.77

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 did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 42× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/all-countries-counties-for-wc/local-governments/NG/KW.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/all-countries-counties-for-wc/local-governments/NG/ED.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/all-countries-counties-for-wc/local-governments/NG/KE.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/all-countries-counties-for-wc/local-governments/NG/NI.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/all-countries-counties-for-wc/local-governments/NG/KO.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/all-countries-counties-for-wc/local-governments/NG/ON.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/all-countries-counties-for-wc/states/GB.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/all-countries-counties-for-wc/local-governments/NG/OG.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/all-countries-counties-for-wc/local-governments/NG/LA.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/all-countries-counties-for-wc/local-governments/NG/KN.php:11

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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: e-commerce, woocommerce-nigerian-states, woocommerce-counties, woocommerce-nigerian-lga, woocommerce-kenya-pronvinces...

all-countries-counties-for-wc/all-countries-counties-for-wc.php Passed 13 tests

"All Countries Counties For WooCommerce" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
91 characters long description:
A Wordpress WooCommerce Plugin that add counties/provinces/states for WooCommerce Countries

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,679 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP43733461,529
Markdown136079
JavaScript1112571

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin