10% custom-css-manager-plugin

Code Review | Custom CSS Manager

WordPress plugin Custom CSS Manager scored10%from 54 tests.

About plugin

  • Plugin page: custom-css-manage...
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.5
  • WordPress version: 6.3.1
  • First release: Dec 15, 2011
  • Latest release: Jun 5, 2013
  • Number of updates: 24
  • Update frequency: every 22.4 days
  • Top authors: ChrisHurst (83.33%)MyWebsiteAdvisor (20.83%)

Code review

54 tests

User reviews

16 reviews

Install metrics

3,000+ active /71,164 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/custom-css-manager-plugin/custom-css-manager-loader.php+18
    Undefined index: action

Server metrics [RAM: ▼1.17MB] [CPU: ▼49.57ms] Passed 4 tests

A check of server-side resources used by Custom CSS Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.6412.77 ▼30.57
Dashboard /wp-admin2.86 ▼0.4918.11 ▼50.04
Posts /wp-admin/edit.php2.86 ▼0.5023.34 ▼29.74
Add New Post /wp-admin/post-new.php2.86 ▼3.0320.77 ▼87.93
Media Library /wp-admin/upload.php2.86 ▼0.3721.44 ▼16.21
Custom CSS Manager /wp-admin/themes.php?page=custom-css-manager-settings2.8620.08

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Custom CSS Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.62 ▲0.141.70 ▼0.5242.33 ▼1.46
Dashboard /wp-admin2,202 ▲225.58 ▼0.0884.12 ▼8.7239.08 ▼5.42
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0539.66 ▼0.0639.79 ▲0.77
Add New Post /wp-admin/post-new.php1,529 ▲123.64 ▲0.45640.36 ▼17.3352.17 ▼11.08
Media Library /wp-admin/upload.php1,407 ▲104.14 ▼0.0797.50 ▼14.8440.40 ▼8.77
Custom CSS Manager /wp-admin/themes.php?page=custom-css-manager-settings1,2434.84120.6846.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/custom-css-manager-plugin/custom-css-manager-plugin.php+239
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=custom-css-manager-settings
    • > Notice in wp-content/plugins/custom-css-manager-plugin/custom-css-manager-plugin.php+227
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=custom-css-manager-settings
    • > Notice in wp-content/plugins/custom-css-manager-plugin/custom-css-manager-plugin.php+227
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/themes.php?page=custom-css-manager-settings
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

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 register_activation_hook() in wp-content/plugins/custom-css-manager-plugin/custom-css-manager-loader.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === custom-css-manager-plugin === )
  • Screenshots: Please add an image for screenshot #1 (Plugin Screenshot)
Please take inspiration from this readme.txt

custom-css-manager-plugin/custom-css-manager-loader.php 92% from 13 tests

The principal PHP file in "Custom CSS Manager" v. 1.5.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-css-manager-plugin.php" instead of "custom-css-manager-loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,511 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21341842,003
PHP3351168427
CSS27281
HTML1010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity23.00
▷ Minimum class complexity11.00
▷ Maximum class complexity35.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods3589.74%
▷ Protected methods00.00%
▷ Private methods410.26%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin