78% custom-css-pro

Code Review | Custom CSS Pro

WordPress plugin Custom CSS Pro scored78%from 54 tests.

About plugin

  • Plugin page: custom-css-pro
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 30, 2016
  • Latest release: May 18, 2022
  • Number of updates: 48
  • Update frequency: every 44.1 days
  • Top authors: WaspThemes (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

8,000+ active /54,765 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.00MB] [CPU: ▼9.51ms] Passed 4 tests

An overview of server-side resources used by Custom CSS Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.37 ▲1.07
Dashboard /wp-admin3.32 ▼0.0348.67 ▼6.07
Posts /wp-admin/edit.php3.37 ▲0.0142.94 ▼3.47
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.78 ▼29.17
Media Library /wp-admin/upload.php3.24 ▲0.0132.46 ▲0.69
Custom CSS Pro /wp-admin/options-general.php?page=custom-css-pro3.2130.72
CCP /wp-admin/admin.php?page=ccp-editor3.0522.91

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Custom CSS Pro
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲7514.17 ▼0.181.79 ▼0.0840.76 ▲0.56
Dashboard /wp-admin2,213 ▲355.60 ▼0.1283.76 ▼15.3047.18 ▲5.73
Posts /wp-admin/edit.php2,118 ▲152.03 ▲0.0733.56 ▼8.1436.39 ▲0.15
Add New Post /wp-admin/post-new.php1,547 ▲1218.26 ▲0.05603.96 ▼24.0567.71 ▲8.43
Media Library /wp-admin/upload.php1,418 ▲184.15 ▼0.0696.93 ▼10.1040.37 ▼5.19
Custom CSS Pro /wp-admin/options-general.php?page=custom-css-pro1,1863.8163.6298.87
CCP /wp-admin/admin.php?page=ccp-editor5242.9960.7343.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-css-pro/index.php:39

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=custom-css-pro
    • > Network (severe)
    wp-content/plugins/custom-css-pro/custom-css-pro.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

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
4 plugin tags: css, custom css, simple, custom

custom-css-pro/index.php 92% from 13 tests

Analyzing the main PHP file in "Custom CSS Pro" version 1.0.7
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-css-pro.php" instead of "index.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
No dangerous file extensions were detected692 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript286947392
CSS1176179
PHP17139121

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/left.png0.24KB0.28KB0.00%
img/cog.png0.56KB0.57KB0.00%