74% better-categories

Code Review | Better Categories

WordPress plugin Better Categories scored74%from 54 tests.

About plugin

  • Plugin page: better-categories
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Apr 24, 2017
  • Latest release: Oct 20, 2020
  • Number of updates: 8
  • Update frequency: every 159.8 days
  • Top authors: cmsexpert (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /1,419 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.91MB] [CPU: ▼36.17ms] Passed 4 tests

A check of server-side resources used by Better Categories
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.99 ▼2.51
Dashboard /wp-admin3.04 ▼0.2724.85 ▼26.45
Posts /wp-admin/edit.php3.04 ▼0.3224.46 ▼29.75
Add New Post /wp-admin/post-new.php3.04 ▼2.8523.90 ▼82.27
Media Library /wp-admin/upload.php3.04 ▼0.1928.57 ▼6.19

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Better Categories
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲9013.36 ▼0.881.81 ▼0.3841.91 ▼6.62
Dashboard /wp-admin2,266 ▲784.98 ▼0.91102.89 ▼0.6081.81 ▲36.79
Posts /wp-admin/edit.php2,149 ▲602.20 ▲0.1542.35 ▲0.8236.25 ▼1.82
Add New Post /wp-admin/post-new.php1,724 ▲19522.30 ▲4.21701.56 ▲81.7748.93 ▲4.17
Media Library /wp-admin/upload.php1,442 ▲574.26 ▲0.08109.29 ▲6.1179.54 ▲36.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/better-categories/better-categories.php+148
    Undefined index: removepay
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 everything seems fine, this is not 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 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 get_option() in wp-content/plugins/better-categories/better-categories.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed: You can look at the official readme.txt

better-categories/better-categories.php Passed 13 tests

This is the main PHP file of "Better Categories" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
49 characters long description:
Packs the categories hierarchy on post edit page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected168 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11922141
CSS10027

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin