83% envypreloader

Code Review | EnvyPreloader - Website Preloader WordPress Plugin

WordPress plugin EnvyPreloader - Website Preloader WordPress Plugin scored83%from 54 tests.

About plugin

  • Plugin page: envypreloader
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Dec 22, 2020
  • Latest release: Mar 14, 2021
  • Number of updates: 4
  • Update frequency: every 20.5 days
  • Top authors: envytheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /830 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.86ms] Passed 4 tests

Analyzing server-side resources used by EnvyPreloader - Website Preloader WordPress Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.46 ▲0.40
Dashboard /wp-admin3.35 ▲0.0545.33 ▲0.59
Posts /wp-admin/edit.php3.40 ▲0.0543.67 ▼3.31
Add New Post /wp-admin/post-new.php5.93 ▲0.0580.34 ▼8.36
Media Library /wp-admin/upload.php3.28 ▲0.0533.16 ▼0.17

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 92 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for EnvyPreloader - Website Preloader WordPress Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲18713.58 ▼1.045.96 ▲4.2542.05 ▼0.54
Dashboard /wp-admin2,217 ▲265.83 ▲0.9398.80 ▼2.0039.17 ▼2.73
Posts /wp-admin/edit.php2,100 ▲142.01 ▼0.0335.20 ▼4.3532.26 ▼5.02
Add New Post /wp-admin/post-new.php1,540 ▲323.05 ▲0.01661.61 ▲25.8149.75 ▼6.68
Media Library /wp-admin/upload.php1,405 ▲144.25 ▲0.0199.01 ▲3.2140.69 ▼1.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 54× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/envypreloader/public/partials/templates/style-17.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/envypreloader/public/partials/envy-preloader-public-display.php:15
    • > PHP Notice
      Undefined variable: option_preloader_style_new in wp-content/plugins/envypreloader/public/partials/templates/style-16.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/envypreloader/public/partials/templates/style-05.php:22
    • > PHP Notice
      Undefined variable: option_preloader_style_new in wp-content/plugins/envypreloader/public/partials/templates/style-01.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/envypreloader/includes/class-envy-preloader-css-options.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/envypreloader/public/partials/templates/style-10.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/envypreloader/public/partials/templates/style-20.php:20
    • > PHP Notice
      Undefined variable: option_preloader_style_new in wp-content/plugins/envypreloader/public/partials/templates/style-06.php on line 28
    • > PHP Notice
      Undefined variable: option_preloader_style_new in wp-content/plugins/envypreloader/public/partials/templates/style-20.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (16 tag instead of maximum 10)
Please take inspiration from this readme.txt

envypreloader/envy-preloader.php 85% from 13 tests

This is the main PHP file of "EnvyPreloader - Website Preloader WordPress Plugin" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("envypreloader.php" instead of "envy-preloader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin7,535 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS2266542,653
PHP514856072,137
JavaScript2221574

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions73
▷ Named functions73100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin