89% custom-css-js

Code Review | Simple Custom CSS and JS

WordPress plugin Simple Custom CSS and JS scored89%from 54 tests.

About plugin

  • Plugin page: custom-css-js
  • Plugin version: 3.45
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 7, 2015
  • Latest release: Oct 17, 2023
  • Number of updates: 131
  • Update frequency: every 21.9 days
  • Top authors: diana_burduja (100%)

Code review

54 tests

User reviews

88 reviews

Install metrics

600,000+ active /6,095,298 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.41MB] [CPU: ▲1.26ms] Passed 4 tests

This is a short check of server-side resources used by Simple Custom CSS and JS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1341.87 ▼0.53
Dashboard /wp-admin3.86 ▲0.5552.93 ▲3.49
Posts /wp-admin/edit.php3.91 ▲0.5553.92 ▼3.08
Add New Post /wp-admin/post-new.php6.38 ▲0.49101.47 ▲6.01
Media Library /wp-admin/upload.php3.71 ▲0.4744.06 ▲5.17
Settings /wp-admin/edit.php?post_type=custom-css-js&page=custom-css-js-config3.6739.28
All Custom Code /wp-admin/edit.php?post_type=custom-css-js3.7745.70

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 66 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
ccj__version
ccj_settings
ccj__activation_time
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Simple Custom CSS and JS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.38 ▲0.091.60 ▼0.1542.94 ▼2.23
Dashboard /wp-admin2,237 ▲635.67 ▲0.1584.00 ▼21.2945.36 ▲1.54
Posts /wp-admin/edit.php2,136 ▲392.00 ▲0.0335.57 ▼1.1333.51 ▼1.86
Add New Post /wp-admin/post-new.php1,567 ▲3918.05 ▼5.27609.58 ▼50.6776.87 ▲17.32
Media Library /wp-admin/upload.php1,439 ▲394.15 ▼0.06102.74 ▼9.4651.34 ▲5.69
Add Custom HTML /wp-admin/post-new.php?post_type=custom-css-js&language=html2,5763.6398.4457.36
Settings /wp-admin/edit.php?post_type=custom-css-js&page=custom-css-js-config9361.9035.2327.01
All Custom Code /wp-admin/edit.php?post_type=custom-css-js1,2562.1833.0733.25
Add Custom JS /wp-admin/post-new.php?post_type=custom-css-js&language=js2,5763.5089.7156.43
Add Custom CSS /wp-admin/post-new.php?post_type=custom-css-js&language=css2,5853.5387.9956.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-comments
    • ccj__version
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • ccj_settings
    • can_compress_scripts
    • ccj__activation_time

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: A description for screenshot #4 is required in custom-css-js/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
You can look at the official readme.txt

custom-css-js/custom-css-js.php 92% from 13 tests

Analyzing the main PHP file in "Simple Custom CSS and JS" version 3.45
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "3.0.0")

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
No dangerous file extensions were detected7,018 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript364311423,528
PHP75334151,976
PO File3352383989
CSS103329525

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity48.71
▷ Minimum class complexity7.00
▷ Maximum class complexity215.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods80
▷ Static methods56.25%
▷ Public methods7897.50%
▷ Protected methods00.00%
▷ Private methods22.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/button-close-hover.png1.53KB0.59KB▼ 61.67%
assets/images/button-close.png1.50KB0.56KB▼ 62.64%