72% essential-script

Code Review | Essential Script

WordPress plugin Essential Script scored72%from 54 tests.

About plugin

  • Plugin page: essential-script
  • Plugin version: 0.8.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.2
  • WordPress version: 6.3.1
  • First release: Sep 1, 2017
  • Latest release: Jan 17, 2018
  • Number of updates: 50
  • Update frequency: every 2.8 days
  • Top authors: ferocious (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,038 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.07MB] [CPU: ▼3.78ms] Passed 4 tests

Analyzing server-side resources used by Essential Script
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▼0.5519.16 ▼20.52
Dashboard /wp-admin3.44 ▲0.1449.74 ▲6.14
Posts /wp-admin/edit.php3.49 ▲0.1446.75 ▲1.93
Add New Post /wp-admin/post-new.php5.96 ▲0.0795.59 ▲3.14
Media Library /wp-admin/upload.php3.30 ▲0.0732.34 ▲0.35
Essential Script /wp-admin/tools.php?page=essentialscript3.2529.79

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Essential Script
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.64 ▲0.371.72 ▼2.4844.78 ▲1.74
Dashboard /wp-admin2,210 ▲225.90 ▲0.0198.91 ▼2.8738.92 ▼6.06
Posts /wp-admin/edit.php2,096 ▲71.97 ▼0.0135.96 ▼0.7630.90 ▼8.71
Add New Post /wp-admin/post-new.php1,520 ▲618.00 ▲0.58605.96 ▼47.2756.24 ▲2.13
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.0296.69 ▼1.4842.96 ▼1.21
Essential Script /wp-admin/tools.php?page=essentialscript1,1873.5377.9549.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_essential_script
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/tools.php?page=essentialscript
    • > Notice in wp-content/plugins/essential-script/classes/EssentialScript/Core/File.php+78
    file_get_contents(): read of 8192 bytes failed with errno=21 Is a directory

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/essential-script/essential-script.php
  • 33× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'EssentialScript\\Admin\\Settings\\Setting' not found in wp-content/plugins/essential-script/classes/EssentialScript/Admin/Settings/EssentialscriptSection.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'EssentialScript\\Admin\\Scripts\\Decorator' not found in wp-content/plugins/essential-script/classes/EssentialScript/Admin/Scripts/WidgetsWPCodemirror.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'EssentialScript\\Admin\\Scripts\\Decorator' not found in wp-content/plugins/essential-script/classes/EssentialScript/Admin/Scripts/CodemirrorStyleOverride.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'EssentialScript\\Admin\\Scripts\\Component' not found in wp-content/plugins/essential-script/classes/EssentialScript/Admin/Scripts/Essentialscript.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'EssentialScript\\Admin\\Settings\\Creator' not found in wp-content/plugins/essential-script/classes/EssentialScript/Admin/Settings/FieldCreator.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'EssentialScript\\Frontend\\Pages\\Strategy' not found in wp-content/plugins/essential-script/classes/EssentialScript/Frontend/Pages/Single.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'EssentialScript\\Admin\\Settings\\Setting' not found in wp-content/plugins/essential-script/classes/EssentialScript/Admin/Settings/EssentialscriptStorage.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'EssentialScript\\Admin\\SettingsFeature' not found in wp-content/plugins/essential-script/classes/EssentialScript/Admin/Settings/Feature/Async.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'EssentialScript\\Frontend\\Filter\\Strategy' not found in wp-content/plugins/essential-script/classes/EssentialScript/Frontend/Filter/Head.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'EssentialScript\\Admin\\Scripts\\Decorator' not found in wp-content/plugins/essential-script/classes/EssentialScript/Admin/Scripts/CodemirrorModeXml.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: code, css, adsense, scripting, embed...

essential-script/essential-script.php 92% from 13 tests

The principal PHP file in "Essential Script" v. 0.8.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 225 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2,034 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PHP575262,4661,722
PO File26574198
JavaScript112085
CSS2103429

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity3.33
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces10
Interfaces3
Traits0
Classes51
▷ Abstract classes713.73%
▷ Concrete classes4486.27%
▷ Final classes00.00%
Methods177
▷ Static methods21.13%
▷ Public methods17196.61%
▷ Protected methods63.39%
▷ Private methods00.00%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants8
▷ Global constants337.50%
▷ Class constants562.50%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin