83% easy-elements-hider

Code Review | Easy Elements Hider

WordPress plugin Easy Elements Hider scored83%from 54 tests.

About plugin

  • Plugin page: easy-elements-hider
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Apr 24, 2020
  • Latest release: Feb 12, 2022
  • Number of updates: 11
  • Update frequency: every 62.3 days
  • Top authors: cheapwebdesigner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /785 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.29ms] Passed 4 tests

Analyzing server-side resources used by Easy Elements Hider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.31 ▼0.21
Dashboard /wp-admin3.31 ▲0.0149.53 ▼4.95
Posts /wp-admin/edit.php3.37 ▲0.0150.00 ▼2.28
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.54 ▼13.73
Media Library /wp-admin/upload.php3.24 ▲0.0138.88 ▲6.34
Elements Hider /wp-admin/options-general.php?page=encore3.2035.34

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

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

Browser metrics Passed 4 tests

Easy Elements Hider: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.45 ▲0.022.32 ▲0.4641.47 ▼3.81
Dashboard /wp-admin2,202 ▲225.62 ▲0.0686.02 ▼3.5838.85 ▼7.54
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0236.51 ▼5.0235.75 ▲0.15
Add New Post /wp-admin/post-new.php1,550 ▲1023.44 ▲5.19666.42 ▲22.7756.23 ▲5.76
Media Library /wp-admin/upload.php1,407 ▲74.23 ▲0.02114.18 ▲11.3347.24 ▼0.14
Elements Hider /wp-admin/options-general.php?page=encore8252.0527.5346.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-elements-hider/encore.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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: The official readme.txt might help

easy-elements-hider/encore.php 85% from 13 tests

The primary PHP file in "Easy Elements Hider" version 2.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-elements-hider.php" instead of "encore.php")
  • Description: The description should be shorter than 140 characters (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected101 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1129101

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 are no PNG files in this plugin