89% wc-departamentos-y-ciudades-colombia

Code Review | QCode - Departamentos y Ciudades de Colombia para Woocommerce

WordPress plugin QCode - Departamentos y Ciudades de Colombia para Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: wc-departamentos-...
  • Plugin version: 1.0.15
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 20, 2021
  • Latest release: Nov 15, 2023
  • Number of updates: 18
  • Update frequency: every 47.1 days
  • Top authors: qcode1 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /4,790 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: ▼3.69ms] Passed 4 tests

Analyzing server-side resources used by QCode - Departamentos y Ciudades de Colombia para Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.24 ▼3.07
Dashboard /wp-admin3.32 ▲0.0144.02 ▼4.45
Posts /wp-admin/edit.php3.37 ▲0.0145.31 ▼2.78
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.36 ▼4.42
Media Library /wp-admin/upload.php3.24 ▲0.0132.25 ▼2.81

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

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

Browser metrics Passed 4 tests

A check of browser resources used by QCode - Departamentos y Ciudades de Colombia para Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.31 ▼0.041.88 ▲0.2043.61 ▼2.04
Dashboard /wp-admin2,198 ▲215.63 ▲0.0491.46 ▼3.3039.77 ▼7.63
Posts /wp-admin/edit.php2,103 ▼01.94 ▼0.0039.30 ▲3.1238.94 ▲0.80
Add New Post /wp-admin/post-new.php1,526 ▼023.51 ▲0.14703.63 ▲2.4152.64 ▼0.22
Media Library /wp-admin/upload.php1,400 ▲34.11 ▼0.11110.16 ▲7.8246.94 ▲1.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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

readme.txt Passed 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
3 plugin tags: coordinadora, ciudades de colombia, envos colombia

wc-departamentos-y-ciudades-colombia/main.php 85% from 13 tests

The main PHP script in "QCode - Departamentos y Ciudades de Colombia para Woocommerce" version 1.0.15 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-departamentos-y-ciudades-colombia.php" instead of "main.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.5.3" instead of "7.6.0")

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 detected1,719 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP430351,578
JavaScript1307141

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1285.71%
▷ Protected methods00.00%
▷ Private methods214.29%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
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
No PNG images were found in this plugin