84% category-class

Code Review | Category class

WordPress plugin Category class scored84%from 54 tests.

About plugin

  • Plugin page: category-class
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Nov 20, 2013
  • Latest release: Dec 31, 2016
  • Number of updates: 7
  • Update frequency: every 163.6 days
  • Top authors: LordPretender (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,392 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.56ms] Passed 4 tests

A check of server-side resources used by Category class
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.71 ▼4.47
Dashboard /wp-admin3.31 ▲0.0143.16 ▼1.66
Posts /wp-admin/edit.php3.36 ▲0.0045.27 ▼2.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.04 ▲10.25
Media Library /wp-admin/upload.php3.23 ▲0.0032.12 ▼1.16

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Category class
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.80 ▲0.401.98 ▲0.3837.78 ▼2.19
Dashboard /wp-admin2,206 ▲215.84 ▲0.9793.63 ▼21.1439.74 ▼0.27
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0335.32 ▼1.6934.78 ▲0.18
Add New Post /wp-admin/post-new.php1,533 ▲1423.31 ▼0.06613.45 ▼83.5661.90 ▼0.61
Media Library /wp-admin/upload.php1,388 ▲34.22 ▼0.1093.18 ▼8.3142.96 ▼1.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'CCS_Squelette' not found in wp-content/plugins/category-class/inc/article.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CCS_Squelette' not found in wp-content/plugins/category-class/inc/categorie.class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/category-class/category-class.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: library, categories, category, list, posts...

category-class/category-class.php Passed 13 tests

The primary PHP file in "Category class" version 1.3 is used by WordPress to initiate all plugin functionality
80 characters long description:
This is just a class for developpers which can be used into plugins, widget, ...

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin216 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4103198216

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.00
▷ Minimum class complexity2.00
▷ Maximum class complexity24.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods625.00%
▷ Public methods2187.50%
▷ Protected methods00.00%
▷ Private methods312.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin