46% wp-essentials

Code Review | WP Essentials

WordPress plugin WP Essentials scored46%from 54 tests.

About plugin

  • Plugin page: wp-essentials
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.6.1
  • WordPress version: 6.3.1
  • First release: Aug 15, 2013
  • Latest release: Oct 20, 2016
  • Number of updates: 75
  • Update frequency: every 15.5 days
  • Top authors: iprogressltd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /10,464 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.65MB] [CPU: ▼46.68ms] Passed 4 tests

A check of server-side resources used by WP Essentials
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.334.70 ▼34.67
Dashboard /wp-admin2.42 ▼0.8812.07 ▼32.40
Posts /wp-admin/edit.php2.42 ▼0.9411.10 ▼34.19
Add New Post /wp-admin/post-new.php2.42 ▼3.4711.68 ▼85.47
Media Library /wp-admin/upload.php2.41 ▼0.8112.82 ▼20.56
WP Essentials /wp-admin/admin.php?page=wp-essentials2.4213.45

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 126 new files
Database: 1 new table, 43 new options
New tables
wp_wpe_twitter
New WordPress options
widget_twitter
wpe_google_analytics
wpe_video
wpe_style
wpe_twitter_db
wpe_get
wpe_debug_mode
wpe_link_it
wpe_flickr_username
wpe_total_user_roles
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Essentials
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.52 ▼0.868.59 ▲7.0738.75 ▼1.27
Dashboard /wp-admin2,199 ▲85.53 ▲0.7180.63 ▼20.6441.62 ▼0.26
Posts /wp-admin/edit.php2,266 ▲1772.05 ▼0.0034.62 ▼2.3336.25 ▲1.19
Add New Post /wp-admin/post-new.php1,658 ▲13023.10 ▼0.05601.11 ▼87.2952.63 ▼7.09
Media Library /wp-admin/upload.php1,565 ▲1744.27 ▲0.01107.63 ▲8.7747.28 ▲1.40
Styling /wp-admin/admin.php?page=wp-essentials#wpe_styling2,3382.0632.3861.92
Get Image Source /wp-admin/admin.php?page=wp-essentials#wpe_get_image_source2,3411.9830.6746.29
Case-sensitive /wp-admin/admin.php?page=wp-essentials#wpe_lowercase_filenames2,3381.9533.1949.11
WP Essentials /wp-admin/admin.php?page=wp-essentials2,3412.0431.7148.97
Date Shortcode /wp-admin/admin.php?page=wp-essentials#wpe_date2,3421.9531.4245.55
Holding Page /wp-admin/admin.php?page=wp-essentials#wpe_holding_page2,3381.9734.7045.82
Cleanup /wp-admin/admin.php?page=wp-essentials#wpe_cleanup2,3411.9831.2243.74
Custom Excerpt /wp-admin/admin.php?page=wp-essentials#wpe_custom_excerpt2,3411.9832.6148.45
Flickr Feed /wp-admin/admin.php?page=wp-essentials#wpe_flickr_feed2,3411.9630.6947.46
Get Shortcode /wp-admin/admin.php?page=wp-essentials#wpe_get2,3411.9829.7943.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-essentials/system/user-roles.php+124
    Methods with the same name as their class will not be constructors in a future version of PHP; User_Caps has a deprecated constructor
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_wpe_twitter
  • The uninstall procedure has failed, leaving 43 options in the database
    • widget_facebook_fanbox
    • widget_recent-posts
    • wpe_flickr_api
    • wpe_facebook
    • wpe_email
    • widget_recent-comments
    • wpe_video
    • widget_twitter
    • wpe_image_quality
    • wpe_google_analytics
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wp-essentials
    • > Deprecated in wp-content/plugins/wp-essentials/system/user-roles.php+124
    Methods with the same name as their class will not be constructors in a future version of PHP; User_Caps has a deprecated constructor
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-essentials
    • > Notice in wp-content/plugins/wp-essentials/settings.php+359
    Undefined offset: 3
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-essentials
    • > Notice in wp-content/plugins/wp-essentials/settings.php+357
    Undefined offset: 1
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-essentials
    • > Notice in wp-content/plugins/wp-essentials/settings.php+358
    Undefined offset: 2
    • > GET request to /wp-admin/admin.php?page=wp-essentials
    • > Deprecated in wp-content/plugins/wp-essentials/system/image-quality.php+2
    Function create_function() is deprecated
    • > GET request to /wp-admin/admin.php?page=wp-essentials
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Facebook_Fanbox is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/admin.php?page=wp-essentials
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Google_Maps is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/admin.php?page=wp-essentials
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Twitter is deprecated since version 4.3.0! Use __construct() instead.
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-essentials
    • > Notice in wp-content/plugins/wp-essentials/settings.php+147
    Undefined variable: wpe_i
    • > GET request to /wp-admin/admin.php?page=wp-essentials
    • > Notice in wp-content/plugins/wp-essentials/settings.php+164
    Trying to get property 'error' of non-object
    • > GET request to /wp-admin/admin.php?page=wp-essentials
    • > Notice in wp-content/plugins/wp-essentials/settings.php+192
    Trying to get property 'referral' of non-object
    • > GET request to /wp-admin/admin.php?page=wp-essentials
    • > Notice in wp-content/plugins/wp-essentials/settings.php+360
    Undefined offset: 4

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 10× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-essentials/scripts/index.php
    • > /wp-content/plugins/wp-essentials/system/index.php
    • > /wp-content/plugins/wp-essentials/functions/index.php
    • > /wp-content/plugins/wp-essentials/images/index.php
    • > /wp-content/plugins/wp-essentials/system/sass/phpsass/test.php
    • > /wp-content/plugins/wp-essentials/shortcodes/index.php
    • > /wp-content/plugins/wp-essentials/plugins/index.php
    • > /wp-content/plugins/wp-essentials/styles/index.php
    • > /wp-content/plugins/wp-essentials/styles/wpe-public-styles.php
    • > /wp-content/plugins/wp-essentials/system/sass/phpsass/compile-apache.php
  • 57× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/wp-essentials/system/sass/phpsass/tree/SassImportNode.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'SassRenderer' not found in wp-content/plugins/wp-essentials/system/sass/phpsass/renderers/SassCompressedRenderer.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-essentials/system/user-roles.php:122
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-essentials/system/footer-link.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/wp-essentials/system/sass/phpsass/tree/SassWarnNode.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/wp-essentials/system/validate.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-essentials/plugins/facebook.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-essentials/shortcodes/php-date.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'SassRenderer' not found in wp-content/plugins/wp-essentials/system/sass/phpsass/renderers/SassCompressedRenderer.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/wp-essentials/system/sass/phpsass/tree/SassDebugNode.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-essentials#wpe_get
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-essentials/scripts/wpe-settings.js?ver=6.3.1:95:32)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-essentials#wpe_get
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
Please take inspiration from this readme.txt

wp-essentials/wp-essentials.php Passed 13 tests

Analyzing the main PHP file in "WP Essentials" version 3.0
80 characters long description:
All-in-one bundle of essential plugins and functions for all WordPress websites.

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 plugin22,517 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
PHP901,2295,79821,123
JSON200970
JavaScript62714268
CSS554103
SVG20053

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity17.65
▷ Minimum class complexity1.00
▷ Maximum class complexity352.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes88
▷ Abstract classes22.27%
▷ Concrete classes8697.73%
▷ Final classes00.00%
Methods579
▷ Static methods12421.42%
▷ Public methods49585.49%
▷ Protected methods305.18%
▷ Private methods549.33%
Functions100
▷ Named functions9090.00%
▷ Anonymous functions1010.00%
Constants185
▷ Global constants84.32%
▷ Class constants17795.68%
▷ Public constants177100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 7.18MB with 2.96MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/emoji.png7,351.07KB2,275.79KB▼ 69.04%
images/icon.png1.17KB0.53KB▼ 54.67%
images/email-button.png0.43KB0.43KB0.00%