89% hide-element

Code Review | Hide Element Shortcode

WordPress plugin Hide Element Shortcode scored89%from 54 tests.

About plugin

  • Plugin page: hide-element
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 5, 2015
  • Latest release: Oct 5, 2015
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: mapumba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,504 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.90ms] Passed 4 tests

Server-side resources used by Hide Element Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.25 ▼5.39
Dashboard /wp-admin3.33 ▲0.0251.22 ▼6.46
Posts /wp-admin/edit.php3.38 ▲0.0252.04 ▲2.65
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.49 ▲1.80
Media Library /wp-admin/upload.php3.25 ▲0.0233.59 ▼1.53

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hide Element Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.121.67 ▼0.0544.04 ▲0.49
Dashboard /wp-admin2,195 ▲215.62 ▲0.0493.30 ▲0.1342.00 ▲1.97
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0740.83 ▲1.8136.66 ▲2.50
Add New Post /wp-admin/post-new.php1,535 ▲918.18 ▼4.93641.07 ▼56.1268.12 ▲2.35
Media Library /wp-admin/upload.php1,397 ▼34.16 ▼0.0897.69 ▼10.3945.86 ▼1.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Visual Composer integration) image missing
  • Plugin Name: Please specify the plugin name on the first line ( === hide-element === )
Please take inspiration from this readme.txt

hide-element/hide-element.php Passed 13 tests

The principal PHP file in "Hide Element Shortcode" v. 1.0.0 is loaded by WordPress automatically on each request
27 characters long description:
Hide content of your pages.

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
Good job! No executable or dangerous file extensions detected69 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1271369

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png135.40KB46.29KB▼ 65.81%