84% modular-custom-css

Code Review | Modular Custom CSS

WordPress plugin Modular Custom CSS scored84%from 54 tests.

About plugin

  • Plugin page: modular-custom-css
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 7, 2014
  • Latest release: Sep 18, 2023
  • Number of updates: 21
  • Update frequency: every 158.5 days
  • Top authors: celloexpressions (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

700+ active /16,284 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.02MB] [CPU: ▼1.21ms] Passed 4 tests

A check of server-side resources used by Modular Custom CSS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0249.01 ▲0.93
Dashboard /wp-admin3.33 ▲0.0250.58 ▲2.60
Posts /wp-admin/edit.php3.38 ▲0.0247.74 ▼1.50
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.45 ▼4.24
Media Library /wp-admin/upload.php3.25 ▲0.0236.30 ▼0.02

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Modular Custom CSS
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.371.73 ▲0.1142.35 ▼0.13
Dashboard /wp-admin2,195 ▲245.62 ▼0.0588.41 ▼6.2941.89 ▼1.18
Posts /wp-admin/edit.php2,103 ▼01.99 ▲0.0033.58 ▼7.1534.04 ▼4.84
Add New Post /wp-admin/post-new.php1,526 ▼223.04 ▼0.22715.99 ▲58.7451.82 ▼9.12
Media Library /wp-admin/upload.php1,397 ▼34.23 ▲0.03102.98 ▼3.1947.86 ▲0.82

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/modular-custom-css/modular-custom-css.php:104

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: css, customizer, custom design, custom css

modular-custom-css/modular-custom-css.php Passed 13 tests

The entry point to "Modular Custom CSS" version 2.1 is a PHP file that has certain tags in its header comment area
88 characters long description:
Manage and live-preview theme-specific and plugin-specific Custom CSS in the Customizer.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin78 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1155066
JavaScript10312

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin