78% scripts-and-styles

Code Review | Scripts and Styles

WordPress plugin Scripts and Styles scored78%from 54 tests.

About plugin

  • Plugin page: scripts-and-styles
  • Plugin version: 1.0.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Sep 8, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: sethlivingston (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,101 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.30ms] Passed 4 tests

An overview of server-side resources used by Scripts and Styles
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.47 ▼0.58
Dashboard /wp-admin3.34 ▼0.0051.30 ▼18.48
Posts /wp-admin/edit.php3.39 ▲0.0445.29 ▲2.52
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.61 ▼19.22
Media Library /wp-admin/upload.php3.27 ▲0.0434.90 ▲1.09
Scripts and Styles /wp-admin/options-general.php?page=ScriptsAndStylesBySL_options3.2131.05

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Scripts and Styles
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.101.61 ▼0.1243.86 ▲1.07
Dashboard /wp-admin2,207 ▲195.83 ▲0.9796.08 ▼21.2339.40 ▼9.00
Posts /wp-admin/edit.php2,090 ▲12.04 ▲0.0536.15 ▲1.9231.64 ▼3.97
Add New Post /wp-admin/post-new.php1,545 ▲3123.17 ▲5.48634.59 ▼24.7658.79 ▲6.37
Media Library /wp-admin/upload.php1,392 ▲14.27 ▲0.0495.65 ▼2.4140.41 ▼1.93
Scripts and Styles /wp-admin/options-general.php?page=ScriptsAndStylesBySL_options8882.0521.8533.40

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=ScriptsAndStylesBySL_options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=ScriptsAndStylesBySL_options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/scripts-and-styles/scripts-and-styles.php:183

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

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
The official readme.txt is a good inspiration

scripts-and-styles/scripts-and-styles.php Passed 13 tests

The main PHP file in "Scripts and Styles" ver. 1.0.12 adds more information about the plugin and also serves as the entry point for this plugin
128 characters long description:
Add arbitrary JavaScript and CSS files to your WordPress site. Encourages best practices for site performance and compatibility.

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
Success! There were no dangerous files found in this plugin161 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22213161

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods457.14%
▷ Protected methods00.00%
▷ Private methods342.86%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin