89% wp-hide-show-featured-image

Code Review | WP Hide Show Featured Image

WordPress plugin WP Hide Show Featured Image scored89%from 54 tests.

About plugin

  • Plugin page: wp-hide-show-feat...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 6, 2020
  • Latest release: Nov 4, 2022
  • Number of updates: 9
  • Update frequency: every 101.3 days
  • Top authors: galaxyweblinks (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /5,407 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.04MB] [CPU: ▼3.19ms] Passed 4 tests

This is a short check of server-side resources used by WP Hide Show Featured Image
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.24 ▲0.70
Dashboard /wp-admin3.35 ▲0.0449.39 ▼2.59
Posts /wp-admin/edit.php3.40 ▲0.0451.47 ▼3.79
Add New Post /wp-admin/post-new.php5.93 ▲0.04100.31 ▼7.08
Media Library /wp-admin/upload.php3.27 ▲0.0438.24 ▲2.61
WP Hide Show Featured Image /wp-admin/options-general.php?page=whsfi_hide_options3.2435.80

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Hide Show Featured Image
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.30 ▼0.251.84 ▼0.1339.74 ▼10.02
Dashboard /wp-admin2,199 ▲255.65 ▲0.0493.96 ▲4.3541.78 ▼4.05
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0741.52 ▲0.8437.73 ▼0.37
Add New Post /wp-admin/post-new.php1,535 ▲923.47 ▲5.98649.57 ▼42.0560.22 ▲6.35
Media Library /wp-admin/upload.php1,404 ▲44.20 ▼0.0696.84 ▼18.8545.04 ▼4.35
WP Hide Show Featured Image /wp-admin/options-general.php?page=whsfi_hide_options9032.0726.2627.25

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Requires php: Version format is invalid
  • Requires at least: Version format is invalid
You can look at the official readme.txt

wp-hide-show-featured-image/wp-hide-show-featured-image.php 92% from 13 tests

The main PHP file in "WP Hide Show Featured Image" ver. 2.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 232 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin162 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22035159
CSS1003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected