89% wc-city-select

Code Review | WC City Select

WordPress plugin WC City Select scored89%from 54 tests.

About plugin

  • Plugin page: wc-city-select
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-6.4
  • WordPress version: 6.3.1
  • First release: Nov 11, 2015
  • Latest release: Nov 1, 2023
  • Number of updates: 28
  • Update frequency: every 104.0 days
  • Top authors: mantish (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /25,531 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Server-side resources used by WC City Select
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.70 ▼5.18
Dashboard /wp-admin3.34 ▲0.0347.37 ▼4.87
Posts /wp-admin/edit.php3.39 ▲0.0349.56 ▲1.76
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.32 ▼0.32
Media Library /wp-admin/upload.php3.26 ▲0.0333.89 ▼2.25

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WC City Select
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.72 ▲0.561.68 ▼0.1040.04 ▼2.66
Dashboard /wp-admin2,195 ▲155.61 ▼0.0489.78 ▲1.1841.74 ▲0.55
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0738.61 ▲1.1236.09 ▼0.77
Add New Post /wp-admin/post-new.php1,526 ▼023.15 ▼0.20717.67 ▲14.0158.10 ▲5.13
Media Library /wp-admin/upload.php1,403 ▲94.13 ▼0.09101.86 ▲2.3342.84 ▲0.65

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected 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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("mailto:paypal@8manos.com")
The official readme.txt is a good inspiration

wc-city-select/wc-city-select.php 92% from 13 tests

Analyzing the main PHP file in "WC City Select" version 1.0.8
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "2.2")

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
Everything looks great! No dangerous files found in this plugin35,990 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP131028535,849
JavaScript1327141

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.39
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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