62% custom-css-editor

Code Review | Custom CSS

WordPress plugin Custom CSS scored62%from 54 tests.

About plugin

  • Plugin page: custom-css-editor
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 1, 2015
  • Latest release: Oct 25, 2016
  • Number of updates: 11
  • Update frequency: every 38.2 days
  • Top authors: FRESHFACE (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

2,000+ active /67,495 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼38.47ms] Passed 4 tests

A check of server-side resources used by Custom CSS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3816.63 ▼23.31
Dashboard /wp-admin3.86 ▲0.5519.02 ▼29.49
Posts /wp-admin/edit.php3.86 ▲0.5023.75 ▼29.84
Add New Post /wp-admin/post-new.php3.86 ▼2.0316.67 ▼71.22
Media Library /wp-admin/upload.php3.86 ▲0.6320.53 ▼15.80
Custom Code /wp-admin/edit.php?post_type=ff-customcode-item3.8616.71

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 712 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Custom CSS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.22 ▼1.181.83 ▲0.1045.57 ▼2.66
Dashboard /wp-admin2,246 ▲585.81 ▼0.03100.24 ▼2.0043.43 ▲1.25
Posts /wp-admin/edit.php2,129 ▲402.05 ▲0.0440.15 ▼5.5139.86 ▲1.77
Add New Post /wp-admin/post-new.php1,551 ▲1817.56 ▼5.65663.30 ▲52.2154.93 ▲3.04
Media Library /wp-admin/upload.php1,428 ▲374.25 ▲0.0099.59 ▼4.2045.63 ▼1.01
Custom Code /wp-admin/edit.php?post_type=ff-customcode-item1,1012.1032.4831.88

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 cannot be uninstalled
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+66
    fopen(wp-content/uploads/freshframework/less_scss/last_deletion.frs): failed to open stream: No such file or directory
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=ff-customcode-item
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+66
    fopen(wp-content/uploads/freshframework/less_scss/last_deletion.frs): failed to open stream: No such file or directory

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/custom-css-editor/fresh-framework/framework/extern/iconfonts/fonts.php
  • 334× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/custom-css-editor/fresh-framework/framework/extern/less/lib/Less/Exception/Chunk.php on line 155
    • > PHP Fatal error
      Uncaught Error: Class 'ffOptionsWalker' not found in wp-content/plugins/custom-css-editor/fresh-framework/framework/options/walkers/class.ffOptionsArrayConvertor.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ffFactoryAbstract' not found in wp-content/plugins/custom-css-editor/fresh-framework/framework/dataStorage/factories/class.ffDataStorage_Factory.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/custom-css-editor/fresh-framework/framework/options/walkers/printers/class.ffOptionsPrinterDataBoxGenerator.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/custom-css-editor/fresh-framework/framework/adminScreens/metaBoxes/class.ffMetaBoxView.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/custom-css-editor/fresh-framework/framework/query/posts/items/class.ffPostGetter.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/custom-css-editor/fresh-framework/framework/query/getters/____class.ffPostGetter.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/custom-css-editor/fresh-framework/framework/shortcodes/class.ffShortcodeManager.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/custom-css-editor/fresh-framework/framework/assetsIncluding/lessScssCompiler/class.ffLessSystemColorLibraryBackend.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffFactoryAbstract' not found in wp-content/plugins/custom-css-editor/fresh-framework/framework/query/attachments/items/class.ffAttachmentCollection_Factory.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: custom code, custom js, custom css

custom-css-editor/freshplugin.php 92% from 13 tests

The principal PHP file in "Custom CSS" v. 1.4.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-css-editor.php" instead of "freshplugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected105,156 lines of code in 593 files:
LanguageFilesBlank linesComment linesLines of code
PHP37612,73211,77937,792
JSON20024,734
JavaScript734,9215,50221,086
LESS741,7961,7488,257
CSS383295276,969
SVG24005,950
XML200286
HTML22075
Markdown2407

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 156)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.38
▷ Minimum class complexity1.00
▷ Maximum class complexity446.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity156.00
Code structure
Namespaces0
Interfaces5
Traits0
Classes425
▷ Abstract classes235.41%
▷ Concrete classes40294.59%
▷ Final classes00.00%
Methods4,062
▷ Static methods741.82%
▷ Public methods2,26955.86%
▷ Protected methods1,13928.04%
▷ Private methods65416.10%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants372
▷ Global constants9926.61%
▷ Class constants27373.39%
▷ Public constants273100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
27 PNG files occupy 0.15MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
fresh-framework/framework/extern/jquery-ui/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%
fresh-framework/framework/adminScreens/assets/images/modal-library-size-slider-control-right@2x.png5.84KB0.11KB▼ 98.13%
fresh-framework/framework/adminScreens/assets/images/modal-library-size-slider-control-right.png5.81KB0.10KB▼ 98.20%
fresh-framework/framework/adminScreens/assets/images/repeatable_boxed_icon_plus@2x.png5.83KB0.11KB▼ 98.14%
fresh-framework/framework/extern/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%