84% my-custom-styles

Code Review | My Custom Styles

WordPress plugin My Custom Styles scored 84% from 54 tests.

About plugin

  • Plugin page: my-custom-styles
  • Plugin version: 4.51
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 5.9.2
  • First release: Sep 7, 2015
  • Latest release: Jan 24, 2022
  • Number of updates: 138
  • Update frequency: every 16.9 days
  • Top authors: Arthur Gareginyan (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 22,815 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼297.16ms] Passed 4 tests

Analyzing server-side resources used by My Custom Styles
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1554.97 ▲2.78
Dashboard /wp-admin3.53 ▲0.0933.89 ▼0.04
Posts /wp-admin/edit.php3.76 ▲0.0937.54 ▼4.62
Add New Post /wp-admin/post-new.php7.00 ▼0.0194.19 ▼1,185.14
Media Library /wp-admin/upload.php3.41 ▲0.0826.60 ▲1.15
CSS Inserter /wp-admin/options-general.php?page=my-custom-styles3.5225.13

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 72 new files
Database: no new tables, 1 new option
New WordPress options
spacexchimp_p003_service_info

Browser metrics Passed 4 tests

An overview of browser requirements for My Custom Styles
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲5816.19 ▲0.206.71 ▲0.442.36 ▲0.00
Dashboard /wp-admin2,897 ▲366.11 ▼0.08114.87 ▼21.95154.80 ▼5.77
Posts /wp-admin/edit.php2,696 ▲23.37 ▲0.1363.82 ▼0.12142.47 ▼0.89
Add New Post /wp-admin/post-new.php1,784 ▲7317.05 ▼3.66415.12 ▼32.38156.80 ▼1.46
Media Library /wp-admin/upload.php1,700 ▲25.49 ▲0.01145.07 ▲6.95192.36 ▲8.09
CSS Inserter /wp-admin/options-general.php?page=my-custom-styles3,0983.7684.26112.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • spacexchimp_p003_service_info

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 15× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/my-custom-styles/inc/php/upgrade.php
    • > /wp-content/plugins/my-custom-styles/my-custom-styles.php
    • > /wp-content/plugins/my-custom-styles/inc/php/inline-js.php
    • > /wp-content/plugins/my-custom-styles/inc/php/versioning.php
    • > /wp-content/plugins/my-custom-styles/inc/php/tabs/usage.php
    • > /wp-content/plugins/my-custom-styles/inc/php/page.php
    • > /wp-content/plugins/my-custom-styles/inc/php/enqueue.php
    • > /wp-content/plugins/my-custom-styles/inc/php/tabs/support.php
    • > /wp-content/plugins/my-custom-styles/inc/php/sidebar.php
    • > /wp-content/plugins/my-custom-styles/inc/php/tabs/faq.php

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (22 tag instead of maximum 10)
Please take inspiration from this readme.txt

my-custom-styles/my-custom-styles.php 92% from 13 tests

"My Custom Styles" version 4.51's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 156 characters long)

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
Success! There were no dangerous files found in this plugin17,485 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript141,1471,0809,354
SVG2102,677
PO File57607751,695
Markdown386501,298
PHP16229291996
CSS57296850
HTML5930568
JSON10047

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 compressed PNG files occupy 0.04MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/img/thanks.png9.03KB9.47KB0.00%
inc/img/upgrade.png9.02KB9.71KB0.00%
inc/img/spacexchimp-logo.png21.01KB14.98KB▼ 28.69%