84% simple-exclude-categories

Code Review | Simple Exclude Categories

WordPress plugin Simple Exclude Categories scored84%from 54 tests.

About plugin

  • Plugin page: simple-exclude-ca...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 17, 2014
  • Latest release: Feb 26, 2018
  • Number of updates: 5
  • Update frequency: every 294.2 days
  • Top authors: jacking83 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /5,418 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

This is a short check of server-side resources used by Simple Exclude Categories
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.16 ▼7.87
Dashboard /wp-admin3.32 ▲0.0142.64 ▼1.98
Posts /wp-admin/edit.php3.37 ▲0.0146.94 ▲5.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0175.35 ▼23.99
Media Library /wp-admin/upload.php3.24 ▲0.0133.57 ▼0.67

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Simple Exclude Categories: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.30 ▼0.994.06 ▲2.2742.16 ▼6.42
Dashboard /wp-admin2,208 ▲204.86 ▼0.00114.14 ▼0.7841.66 ▼2.04
Posts /wp-admin/edit.php2,091 ▼12.00 ▼0.0439.47 ▼1.9936.34 ▼1.66
Add New Post /wp-admin/post-new.php1,516 ▼2617.56 ▼0.71661.77 ▲46.1860.43 ▲4.75
Media Library /wp-admin/upload.php1,393 ▲24.12 ▼0.05102.55 ▼13.1143.35 ▼8.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • 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)
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-exclude-categories/index.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: hide, exclude, options, categories

simple-exclude-categories/index.php 92% from 13 tests

The main file in "Simple Exclude Categories" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-exclude-categories.php" instead of "index.php")

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 plugin40 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1142238
CSS1002

PHP code Passed 2 tests

A short 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.26
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png34.12KB9.31KB▼ 72.72%