74% custom-style-script

Code Review | Custom Style Script

WordPress plugin Custom Style Script scored 74% from 54 tests.

About plugin

  • Plugin page: custom-style-script
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Mar 18, 2014
  • Latest release: May 15, 2014
  • Number of updates: 12
  • Update frequency: every 4.8 days
  • Top authors: bappi.d.great (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 6,509 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.91MB] [CPU: ▼33.32ms] Passed 4 tests

Server-side resources used by Custom Style Script
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0624.59 ▼16.66
Dashboard /wp-admin3.04 ▼0.2726.46 ▼23.42
Posts /wp-admin/edit.php3.04 ▼0.3227.06 ▼21.36
Add New Post /wp-admin/post-new.php3.04 ▼2.8524.83 ▼71.84
Media Library /wp-admin/upload.php3.04 ▼0.1922.97 ▼8.48

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Custom Style Script
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲13313.60 ▼0.901.73 ▼0.0437.73 ▼9.16
Dashboard /wp-admin2,234 ▲435.79 ▼0.1294.09 ▼2.6741.46 ▼2.89
Posts /wp-admin/edit.php2,120 ▲312.00 ▼0.0539.86 ▼0.7337.03 ▲2.26
Add New Post /wp-admin/post-new.php1,561 ▲2823.47 ▲0.24629.32 ▲18.1360.75 ▲6.33
Media Library /wp-admin/upload.php1,419 ▲344.21 ▲0.0496.05 ▼3.2443.25 ▲0.87

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
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Css_class' does not have a method 'register_settings_and_fields'
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/custom-style-script/custom-style-script.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === custom-style-script === )
You can look at the official readme.txt

custom-style-script/custom-style-script.php 92% from 13 tests

"Custom Style Script" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected248 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12527203
PO File1151745

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin