10% easy-speed-optimizer

Code Review | Easy Speed Optimizer

WordPress plugin Easy Speed Optimizer scored 10% from 54 tests.

About plugin

  • Plugin page: easy-speed-optimizer
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Jan 8, 2022
  • Latest release: Aug 27, 2023
  • Number of updates: 17
  • Update frequency: every 35.2 days
  • Top authors: zahardoc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 459 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/easy-speed-optimizer/app/controllers/class-plugin-assets-controller.php+19
    Use of undefined constant WPPLGNBLRPLT_PLUGIN_VERSION - assumed 'WPPLGNBLRPLT_PLUGIN_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.81MB] [CPU: ▼55.10ms] Passed 4 tests

Server-side resources used by Easy Speed Optimizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.49 ▼2.17
Dashboard /wp-admin2.13 ▼1.178.34 ▼45.91
Posts /wp-admin/edit.php2.14 ▼1.226.87 ▼45.09
Add New Post /wp-admin/post-new.php2.14 ▼3.756.02 ▼101.27
Media Library /wp-admin/upload.php2.14 ▼1.097.70 ▼28.13
Easy Speed Optimizer /wp-admin/options-general.php?page=espdopt_settings2.146.72

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

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

Browser metrics Passed 4 tests

Easy Speed Optimizer: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.20 ▼1.394.75 ▲2.9647.35 ▲0.31
Dashboard /wp-admin2,214 ▲234.89 ▲0.02106.80 ▲2.5239.06 ▼4.61
Posts /wp-admin/edit.php2,097 ▲82.03 ▲0.0339.85 ▼1.6234.19 ▼0.44
Add New Post /wp-admin/post-new.php1,363 ▼15816.63 ▼6.37591.21 ▼60.2045.19 ▼5.94
Media Library /wp-admin/upload.php1,396 ▲84.27 ▲0.0996.79 ▼13.4841.34 ▼5.77
Easy Speed Optimizer /wp-admin/options-general.php?page=espdopt_settings8161.8525.8330.23

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 had uncaught errors
    • > Warning in wp-content/plugins/easy-speed-optimizer/app/controllers/class-plugin-assets-controller.php+19
    Use of undefined constant WPPLGNBLRPLT_PLUGIN_VERSION - assumed 'WPPLGNBLRPLT_PLUGIN_VERSION' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=espdopt_settings
    • > Warning in wp-content/plugins/easy-speed-optimizer/app/controllers/class-plugin-assets-controller.php+19
    Use of undefined constant WPPLGNBLRPLT_PLUGIN_VERSION - assumed 'WPPLGNBLRPLT_PLUGIN_VERSION' (this will throw an Error in a future version of PHP)

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 take a closer look at the following
  • 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Espdopt\\Entities\\Abstract_Entity' not found in wp-content/plugins/easy-speed-optimizer/app/entities/class-settings-tab.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Espdopt\\Interfaces\\Singleton' not found in wp-content/plugins/easy-speed-optimizer/app/controllers/class-speed-optimize-controller.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/easy-speed-optimizer/templates/settings/fields/checkbox.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/easy-speed-optimizer/templates/settings/fields/hidden.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/easy-speed-optimizer/config/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/easy-speed-optimizer/templates/settings/fields/button.php:8
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/easy-speed-optimizer/templates/settings/fields/text.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/easy-speed-optimizer/templates/settings/fields/select.php:8
    • > PHP Fatal error
      Trait 'Espdopt\\Traits\\Singleton' not found in wp-content/plugins/easy-speed-optimizer/app/controllers/class-plugin-assets-controller.php on line 11
    • > PHP Fatal error
      Uncaught Error: Interface 'Espdopt\\Interfaces\\Service' not found in wp-content/plugins/easy-speed-optimizer/app/services/class-assets-listener.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Screenshot #4 (Use the Critical CSS settings to load the page faster.) image missing
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === easy-speed-optimizer === )
Please take inspiration from this readme.txt

easy-speed-optimizer/easy-speed-optimizer.php Passed 13 tests

The main file in "Easy Speed Optimizer" v. 1.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
115 characters long description:
This plugin removes redundant scripts from the pages and provides possibility to setup above the fold critical CSS.

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 plugin848 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP27241269776
CSS29067
JSON1004
JavaScript1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.14
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces7
Interfaces3
Traits1
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods70
▷ Static methods68.57%
▷ Public methods4361.43%
▷ Protected methods2637.14%
▷ Private methods11.43%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected