84% smart-categories

Code Review | Smart Categories

WordPress plugin Smart Categories scored84%from 54 tests.

About plugin

  • Plugin page: smart-categories
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Jul 6, 2015
  • Number of updates: 13
  • Update frequency: every 1.6 days
  • Top authors: robpannell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /986 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.11MB] [CPU: ▼7.87ms] Passed 4 tests

Server-side resources used by Smart Categories
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.88 ▼0.5818.58 ▼22.10
Dashboard /wp-admin3.35 ▲0.0550.41 ▼5.11
Posts /wp-admin/edit.php3.40 ▲0.0554.52 ▲4.03
Add New Post /wp-admin/post-new.php5.93 ▲0.0593.48 ▼5.19
Media Library /wp-admin/upload.php3.28 ▲0.0538.38 ▲0.91

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 11 new options
New WordPress options
AutoCatRuleIDs
can_compress_scripts
AutoCatRule1Phrase
AutoCatLastSorted
widget_recent-posts
AutoCatActive
AutoCatRule1Cat
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Smart Categories
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.71 ▲0.361.81 ▼0.2840.63 ▲0.93
Dashboard /wp-admin2,214 ▲435.56 ▼0.1194.58 ▼5.7742.12 ▼4.39
Posts /wp-admin/edit.php2,119 ▲161.98 ▲0.0138.57 ▲1.7434.44 ▼2.91
Add New Post /wp-admin/post-new.php1,539 ▲1323.60 ▲0.46622.85 ▼42.4065.38 ▲17.54
Media Library /wp-admin/upload.php1,416 ▲194.20 ▲0.04100.18 ▼7.4944.51 ▼2.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-categories/SmartCategories.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
3 plugin tags: taxonomy, categories, posts

smart-categories/SmartCategories.php 92% from 13 tests

This is the main PHP file of "Smart Categories" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("smart-categories.php" instead of "SmartCategories.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin269 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24412269

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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