83% advanced-css-editor

Code Review | Advanced CSS Editor

WordPress plugin Advanced CSS Editor scored83%from 54 tests.

About plugin

  • Plugin page: advanced-css-editor
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2
  • WordPress version: 6.3.1
  • First release: Mar 2, 2016
  • Latest release: May 13, 2019
  • Number of updates: 12
  • Update frequency: every 97.3 days
  • Top authors: hardeepasrani (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

8,000+ active /100,017 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.69ms] Passed 4 tests

This is a short check of server-side resources used by Advanced CSS Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.97 ▼0.62
Dashboard /wp-admin3.34 ▼0.0049.20 ▼16.09
Posts /wp-admin/edit.php3.39 ▲0.0445.28 ▼8.80
Add New Post /wp-admin/post-new.php5.92 ▲0.0487.94 ▼8.95
Media Library /wp-admin/upload.php3.26 ▲0.0435.44 ▼0.91

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Advanced CSS Editor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.34 ▼0.011.74 ▼0.3143.33 ▲4.35
Dashboard /wp-admin2,195 ▲145.51 ▼0.1594.62 ▼5.1344.07 ▲0.45
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0133.28 ▼9.1234.78 ▼0.70
Add New Post /wp-admin/post-new.php1,526 ▼023.52 ▼0.13686.71 ▲12.1758.65 ▲2.97
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.0094.93 ▼1.8940.48 ▼3.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-css-editor/css-editor.php:126
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/advanced-css-editor/layout-picker.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/advanced-css-editor/syntax-highlighter.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Screenshot 1. Add a global custom CSS), #2 (Screenshot 2. Add custom CSS for Desktop), #3 (Screenshot 3. Add custom CSS for Tablet), #4 (Screenshot 4. Add custom CSS for Phone)
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

advanced-css-editor/css-editor.php 85% from 13 tests

This is the main PHP file of "Advanced CSS Editor" version 3.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 147 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-css-editor.php" instead of "css-editor.php")

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
There were no executable files found in this plugin8,220 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript58721,0047,649
CSS24625319
PHP33120252

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods125.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png37.95KB17.90KB▼ 52.82%
screenshot-4.png36.24KB16.17KB▼ 55.38%
screenshot-3.png39.25KB17.22KB▼ 56.13%
screenshot-2.png36.14KB17.37KB▼ 51.94%