78% empty-categories-in-widgets

Code Review | Empty Categories In Widgets

WordPress plugin Empty Categories In Widgets scored78%from 54 tests.

About plugin

  • Plugin page: empty-categories-...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 17, 2016
  • Latest release: Jan 5, 2021
  • Number of updates: 9
  • Update frequency: every 184.8 days
  • Top authors: pawaryogesh1989 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,231 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.00MB] [CPU: ▼5.17ms] Passed 4 tests

This is a short check of server-side resources used by Empty Categories In Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.66 ▲7.55
Dashboard /wp-admin3.31 ▲0.0046.83 ▲1.28
Posts /wp-admin/edit.php3.36 ▲0.0043.18 ▼1.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.41 ▼17.30
Media Library /wp-admin/upload.php3.23 ▲0.0032.43 ▼3.15

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Empty Categories In Widgets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.281.76 ▲0.2044.76 ▲4.53
Dashboard /wp-admin2,198 ▲185.65 ▼0.0182.56 ▼2.7635.81 ▼12.12
Posts /wp-admin/edit.php2,097 ▼01.98 ▼0.0437.67 ▼1.2230.28 ▼4.16
Add New Post /wp-admin/post-new.php1,526 ▼223.36 ▲0.32663.62 ▼18.0855.74 ▲3.96
Media Library /wp-admin/upload.php1,400 ▲34.18 ▼0.0295.38 ▼19.7442.55 ▼13.51

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 output text when accessed directly:
    • > /wp-content/plugins/empty-categories-in-widgets/show-empty-categories.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/empty-categories-in-widgets/classes/class.empty.categories.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Requires at least: Invalid version format
You can take inspiration from this readme.txt

empty-categories-in-widgets/show-empty-categories.php 85% from 13 tests

The principal PHP file in "Empty Categories In Widgets" v. 2.2.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("empty-categories-in-widgets.php" instead of "show-empty-categories.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin23 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2112223

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 were not PNG files found in your plugin