83% wc-provincia-canton-distrito

Code Review | WC Provincia Canton Distrito

WordPress plugin WC Provincia Canton Distrito scored83%from 54 tests.

About plugin

  • Plugin page: wc-provincia-cant...
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Jan 16, 2019
  • Latest release: Nov 3, 2022
  • Number of updates: 26
  • Update frequency: every 59.9 days
  • Top authors: keylorcr (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /9,895 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.43ms] Passed 4 tests

A check of server-side resources used by WC Provincia Canton Distrito
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.27 ▼3.88
Dashboard /wp-admin3.35 ▲0.0045.66 ▼16.20
Posts /wp-admin/edit.php3.46 ▲0.1048.98 ▲3.77
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.90 ▼5.34
Media Library /wp-admin/upload.php3.27 ▲0.0435.11 ▼0.30

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WC Provincia Canton Distrito
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.36 ▼0.261.55 ▼0.0539.13 ▲0.54
Dashboard /wp-admin2,204 ▲295.53 ▼0.1481.76 ▼13.9636.72 ▼6.40
Posts /wp-admin/edit.php2,113 ▲162.02 ▼0.0139.24 ▲2.4738.16 ▲2.84
Add New Post /wp-admin/post-new.php1,540 ▲1223.31 ▲0.30598.69 ▼58.8859.42 ▲5.92
Media Library /wp-admin/upload.php1,412 ▲94.14 ▼0.1094.45 ▼9.9643.36 ▼7.56

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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 fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-provincia-canton-distrito/includes/admin/wcpcd-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wc-provincia-canton-distrito/includes/wcpcd-admin.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: You can take inspiration from this readme.txt

wc-provincia-canton-distrito/wc-prov-cant-dist.php 77% from 13 tests

This is the main PHP file of "WC Provincia Canton Distrito" version 1.4.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-provincia-canton-distrito.php" instead of "wc-prov-cant-dist.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 179 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
No dangerous file extensions were detected804 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP578104363
JavaScript24710228
PO File25876212
JSON1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1684.21%
▷ Protected methods00.00%
▷ Private methods315.79%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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 are no PNG files in this plugin