84% wc-state-update

Code Review | WC State Update

WordPress plugin WC State Update scored84%from 54 tests.

About plugin

  • Plugin page: wc-state-update
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1.3
  • WordPress version: 6.3.1
  • First release: Sep 15, 2014
  • Latest release: Aug 3, 2023
  • Number of updates: 54
  • Update frequency: every 60.1 days
  • Top authors: nwmcinc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /7,938 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.02MB] [CPU: ▼7.53ms] Passed 4 tests

An overview of server-side resources used by WC State Update
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0234.11 ▼4.93
Dashboard /wp-admin3.33 ▲0.0242.35 ▼7.46
Posts /wp-admin/edit.php3.38 ▲0.0244.34 ▼2.68
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.46 ▼15.03
Media Library /wp-admin/upload.php3.25 ▲0.0232.33 ▼0.19

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WC State Update
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.001.70 ▼0.0139.14 ▼3.57
Dashboard /wp-admin2,195 ▲155.63 ▼0.0390.67 ▲2.2035.92 ▼3.24
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0138.55 ▲1.7435.78 ▼4.08
Add New Post /wp-admin/post-new.php1,526 ▼023.75 ▲0.67678.69 ▲38.3152.71 ▼7.82
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0094.36 ▼9.5443.73 ▲1.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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 items
  • 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/wc-state-update/WC_state_update.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: dropdown, checkout, woocommerce, state

wc-state-update/WC_state_update.php 92% from 13 tests

"WC State Update" version 0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-state-update.php" instead of "WC_state_update.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin68 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161268

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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 were not PNG files found in your plugin