84% category-excluder-from-theme-customizer

Code Review | Category Excluder from Theme Customizer

WordPress plugin Category Excluder from Theme Customizer scored84%from 54 tests.

About plugin

  • Plugin page: category-excluder...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Dec 21, 2013
  • Latest release: Dec 21, 2013
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: abhishek6986 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /3,426 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.65ms] Passed 4 tests

An overview of server-side resources used by Category Excluder from Theme Customizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.41 ▼7.03
Dashboard /wp-admin3.32 ▲0.0144.33 ▼7.66
Posts /wp-admin/edit.php3.37 ▲0.0147.29 ▲0.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.99 ▼1.82
Media Library /wp-admin/upload.php3.24 ▲0.0131.66 ▼2.09

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

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

Browser metrics Passed 4 tests

Category Excluder from Theme Customizer: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.63 ▼0.671.85 ▼0.1043.35 ▼1.03
Dashboard /wp-admin2,206 ▲184.80 ▼0.23106.96 ▼10.5439.53 ▼7.85
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0641.21 ▲3.0435.36 ▼1.26
Add New Post /wp-admin/post-new.php1,533 ▲1423.23 ▲0.05647.20 ▼10.7249.45 ▼1.11
Media Library /wp-admin/upload.php1,391 ▲64.20 ▼0.0597.03 ▼0.3442.94 ▲0.17

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/category-excluder-from-theme-customizer/cetc.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Contributors: The plugin contributors field is missing
The official readme.txt might help

category-excluder-from-theme-customizer/cetc.php 92% from 13 tests

The principal PHP file in "Category Excluder from Theme Customizer" v. 1.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("category-excluder-from-theme-customizer.php" instead of "cetc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected77 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2264077

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin