10% imporved-simpler-css

Code Review | Improved Simpler CSS

WordPress plugin Improved Simpler CSS scored10%from 54 tests.

About plugin

  • Plugin page: imporved-simpler-css
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 6.3.1
  • First release: May 12, 2011
  • Latest release: May 4, 2013
  • Number of updates: 11
  • Update frequency: every 66.6 days
  • Top authors: enej (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /10,018 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
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/imporved-simpler-css/improved-simpler-css.php+384
    Non-static method Improved_Simpler_CSS::init() should not be called statically

Server metrics [RAM: ▼1.90MB] [CPU: ▼54.89ms] Passed 4 tests

A check of server-side resources used by Improved Simpler CSS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.374.30 ▼33.75
Dashboard /wp-admin2.12 ▼1.196.47 ▼46.70
Posts /wp-admin/edit.php2.12 ▼1.245.19 ▼49.63
Add New Post /wp-admin/post-new.php2.12 ▼3.777.54 ▼89.49
Media Library /wp-admin/upload.php2.12 ▼1.125.50 ▼33.16
Custom CSS /wp-admin/themes.php?page=custom-css2.126.05

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 94 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Improved Simpler CSS
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲12613.74 ▼0.919.16 ▲7.5047.24 ▲6.72
Dashboard /wp-admin2,199 ▲285.52 ▼0.0287.39 ▼8.7038.38 ▼3.70
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0439.19 ▲0.7737.06 ▼0.96
Add New Post /wp-admin/post-new.php1,540 ▲1418.27 ▼4.62601.25 ▼58.8072.97 ▲23.63
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.07103.10 ▼11.6942.81 ▼6.16
Custom CSS /wp-admin/themes.php?page=custom-css1,0202.7965.9339.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/imporved-simpler-css/improved-simpler-css.php+384
    Non-static method Improved_Simpler_CSS::init() should not be called statically
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Deprecated in wp-content/plugins/imporved-simpler-css/improved-simpler-css.php+384
    Non-static method Improved_Simpler_CSS::init() should not be called statically
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Improved_Simpler_CSS::start() should not be called statically
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Improved_Simpler_CSS::admin_menu() should not be called statically
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Improved_Simpler_CSS::admin() should not be called statically
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Improved_Simpler_CSS::admin_scripts() should not be called statically
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Improved_Simpler_CSS::adminbar_link() should not be called statically
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Improved_Simpler_CSS::admin_page() should not be called statically
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Notice in wp-content/plugins/imporved-simpler-css/view/admin.php+8
    Undefined index: _wpnonce
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Notice in wp-content/plugins/imporved-simpler-css/view/admin.php+9
    Undefined index: update_custom_css_field
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Deprecated in wp-content/plugins/imporved-simpler-css/view/admin.php+17
    Non-static method Improved_Simpler_CSS::get() should not be called statically
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Deprecated in wp-admin/includes/template.php+1443
    Non-static method Improved_Simpler_CSS::revisions_meta_box() should not be called statically
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Notice in wp-content/plugins/imporved-simpler-css/improved-simpler-css.php+323
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/themes.php?page=custom-css
    • > Notice in wp-content/plugins/imporved-simpler-css/view/admin.php+55
    Trying to get property 'post_content' of non-object

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_meta_box() in wp-content/plugins/imporved-simpler-css/view/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/imporved-simpler-css/improved-simpler-css.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tested up to: Version not formatted correctly
  • Screenshots: Add images for these screenshots: #1 (The menu item as it appears under the Appearance menu.), #2 (Live Edit CSS), #3 (OLD Edit Screen), #4 (Revisions Screen)
The official readme.txt is a good inspiration

imporved-simpler-css/improved-simpler-css.php 92% from 13 tests

The entry point to "Improved Simpler CSS" version 2.0.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("imporved-simpler-css.php" instead of "improved-simpler-css.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,022 lines of code in 87 files:
LanguageFilesBlank linesComment linesLines of code
PHP4302434709
JavaScript827729305
CSS1108

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity40.33
▷ Minimum class complexity17.00
▷ Maximum class complexity84.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods50
▷ Static methods00.00%
▷ Public methods3468.00%
▷ Protected methods00.00%
▷ Private methods1632.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 1.53MB with 1.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png1,438.10KB458.79KB▼ 68.10%
screenshot-3.png123.88KB34.13KB▼ 72.45%