84% so-css

Code Review | SiteOrigin CSS

WordPress plugin SiteOrigin CSS scored84%from 54 tests.

About plugin

  • Plugin page: so-css
  • Plugin version: 1.5.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.4
  • WordPress version: 6.3.1
  • First release: Jun 2, 2015
  • Latest release: Nov 11, 2023
  • Number of updates: 103
  • Update frequency: every 30.0 days
  • Top authors: gpriday (60.19%)SiteOrigin (40.78%)

Code review

54 tests

User reviews

147 reviews

Install metrics

200,000+ active /4,703,206 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼5.56ms] Passed 4 tests

Analyzing server-side resources used by SiteOrigin CSS
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1936.08 ▼2.19
Dashboard /wp-admin3.49 ▲0.1453.35 ▼6.70
Posts /wp-admin/edit.php3.60 ▲0.2450.22 ▲4.68
Add New Post /wp-admin/post-new.php6.07 ▲0.1883.85 ▼14.23
Media Library /wp-admin/upload.php3.41 ▲0.1835.53 ▲0.90
Custom CSS /wp-admin/themes.php?page=so_custom_css3.6239.11

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 146 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for SiteOrigin CSS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7214.67 ▲0.491.75 ▲0.1138.66 ▼2.20
Dashboard /wp-admin2,199 ▲195.54 ▼0.1182.18 ▼7.9038.88 ▼4.89
Posts /wp-admin/edit.php2,104 ▲12.02 ▲0.0740.53 ▲3.1436.13 ▲0.16
Add New Post /wp-admin/post-new.php1,537 ▲923.03 ▼0.04622.77 ▲7.0760.31 ▲7.47
Media Library /wp-admin/upload.php1,404 ▲74.16 ▼0.0097.61 ▼4.6541.36 ▲0.25
Custom CSS /wp-admin/themes.php?page=so_custom_css7,67610.41302.0266.64

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/so-css/inc/installer/siteorigin-installer.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/so-css/inc/controller-config.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/so-css/tpl/js-templates.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/so-css/so-css.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/so-css/inc/installer/inc/admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/so-css/inc/installer/tpl/action-btn.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/so-css/tpl/inspector-templates.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/so-css/inc/installer/tpl/admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/so-css/inc/legacy.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_CSS' not found in wp-content/plugins/so-css/tpl/page.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: design, customize, visual css, css editor, css

so-css/so-css.php Passed 13 tests

The entry point to "SiteOrigin CSS" version 1.5.9 is a PHP file that has certain tags in its header comment area
39 characters long description:
An advanced CSS editor from SiteOrigin.

Code Analysis Passed 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 detected35,636 lines of code in 132 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript925,5586,51629,943
PHP116503182,890
CSS14171372,135
HTML5950460
SVG41185
JSON20069
Markdown433054

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity84.25
▷ Minimum class complexity12.00
▷ Maximum class complexity159.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods101
▷ Static methods76.93%
▷ Public methods6059.41%
▷ Protected methods3938.61%
▷ Private methods21.98%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/minicolors/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
css/images/icon.png3.18KB2.53KB▼ 20.53%
inc/installer/img/screenshot.png0.26KB0.23KB▼ 9.09%
css/images/separator.png1.46KB0.78KB▼ 46.65%