89% remove-scripts-styles

Code Review | Remove Scripts & Styles

WordPress plugin Remove Scripts & Styles scored89%from 54 tests.

About plugin

  • Plugin page: remove-scripts-st...
  • Plugin version: 1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 30, 2018
  • Latest release: Aug 31, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: bfintal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /880 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼11.41ms] Passed 4 tests

A check of server-side resources used by Remove Scripts & Styles
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.57 ▲2.38
Dashboard /wp-admin3.31 ▲0.0051.49 ▲0.95
Posts /wp-admin/edit.php3.36 ▲0.0048.33 ▼5.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.87 ▼41.26
Media Library /wp-admin/upload.php3.23 ▲0.0036.27 ▲0.64

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Remove Scripts & Styles
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.51 ▼0.051.84 ▼0.1143.52 ▼3.56
Dashboard /wp-admin2,206 ▲185.83 ▼0.07101.31 ▼0.6238.87 ▼6.00
Posts /wp-admin/edit.php2,086 ▼62.04 ▲0.0335.76 ▼6.2838.39 ▼3.83
Add New Post /wp-admin/post-new.php1,538 ▲1023.08 ▲4.68688.22 ▲54.9470.85 ▲16.20
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0298.83 ▼3.0442.28 ▼1.06

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: speed, deregister, style, optimization, loading time...

remove-scripts-styles/plugin.php 77% from 13 tests

The main PHP script in "Remove Scripts & Styles" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("remove-scripts-styles.php" instead of "plugin.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected117 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31538117

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.65
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin