84% regiones-ciudades-y-comunas-de-chile

Code Review | Regiones, Ciudades y Comunas de Chile para WooCommerce

WordPress plugin Regiones, Ciudades y Comunas de Chile para WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: regiones-ciudades...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Aug 24, 2020
  • Latest release: Oct 16, 2020
  • Number of updates: 12
  • Update frequency: every 4.4 days
  • Top authors: adolfopardoj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,113 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.07ms] Passed 4 tests

Analyzing server-side resources used by Regiones, Ciudades y Comunas de Chile para WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.64 ▼3.11
Dashboard /wp-admin3.35 ▲0.0545.34 ▼5.93
Posts /wp-admin/edit.php3.40 ▲0.0548.77 ▲4.44
Add New Post /wp-admin/post-new.php5.93 ▲0.0592.01 ▼6.36
Media Library /wp-admin/upload.php3.28 ▲0.0535.92 ▼0.86

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Regiones, Ciudades y Comunas de Chile para WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.24 ▼1.514.54 ▲2.6243.67 ▼1.18
Dashboard /wp-admin2,206 ▲154.86 ▼0.0796.64 ▼20.8042.10 ▼2.29
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0239.29 ▲2.7934.29 ▲1.09
Add New Post /wp-admin/post-new.php1,536 ▲823.24 ▲4.87659.78 ▲56.7456.55 ▲7.89
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.1197.20 ▲0.1240.33 ▼2.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/regiones-ciudades-y-comunas-de-chile/regiones-ciudades-y-comunas-de-chile.php:384

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

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 need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

regiones-ciudades-y-comunas-de-chile/regiones-ciudades-y-comunas-de-chile.php 92% from 13 tests

The primary PHP file in "Regiones, Ciudades y Comunas de Chile para WooCommerce" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 173 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected371 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3816371

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin