84% widget-css-classes

Code Review | Widget CSS Classes

WordPress plugin Widget CSS Classes scored84%from 54 tests.

About plugin

  • Plugin page: widget-css-classes
  • Plugin version: 1.5.4.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.1
  • WordPress version: 6.3.1
  • First release: Jul 16, 2012
  • Latest release: Sep 29, 2022
  • Number of updates: 61
  • Update frequency: every 61.1 days
  • Top authors: elusivelight (73.77%)keraweb (27.87%)

Code review

54 tests

User reviews

74 reviews

Install metrics

100,000+ active /1,042,056 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.18MB] [CPU: ▼4.54ms] Passed 4 tests

Server-side resources used by Widget CSS Classes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.43 ▼1.94
Dashboard /wp-admin3.52 ▲0.1745.91 ▼14.65
Posts /wp-admin/edit.php3.63 ▲0.2747.90 ▲3.23
Add New Post /wp-admin/post-new.php6.10 ▲0.2195.37 ▼4.79
Media Library /wp-admin/upload.php3.44 ▲0.2135.67 ▲3.48
Widget CSS Classes /wp-admin/options-general.php?page=widget-css-classes-settings3.4132.35

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Widget CSS Classes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.31 ▼1.121.66 ▼0.0942.47 ▼1.61
Dashboard /wp-admin2,210 ▲224.84 ▼0.04100.39 ▼20.0338.89 ▼9.12
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0140.59 ▼0.7235.59 ▼11.76
Add New Post /wp-admin/post-new.php1,537 ▼518.24 ▼0.13630.28 ▼41.9663.88 ▲5.81
Media Library /wp-admin/upload.php1,392 ▲74.16 ▼0.0397.24 ▼10.6943.36 ▲0.61
Widget CSS Classes /wp-admin/options-general.php?page=widget-css-classes-settings9741.9029.2328.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-css-classes/widget-css-classes.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: widgets, widget classes, classes, css, widget css

widget-css-classes/widget-css-classes.php Passed 13 tests

This is the main PHP file of "Widget CSS Classes" version 1.5.4.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
73 characters long description:
Add custom, first, last, even, odd, and numbered classes to your widgets.

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
No dangerous file extensions were detected1,373 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP6220592947
PO File4140188338
Markdown112040
JavaScript161129
CSS12819

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity33.25
▷ Minimum class complexity2.00
▷ Maximum class complexity81.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods42
▷ Static methods2969.05%
▷ Public methods3173.81%
▷ Protected methods00.00%
▷ Private methods1126.19%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin