84% hide-featured-image

Code Review | Hide Featured Image

WordPress plugin Hide Featured Image scored84%from 54 tests.

About plugin

  • Plugin page: hide-featured-image
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.6
  • WordPress version: 6.3.1
  • First release: May 22, 2015
  • Latest release: May 28, 2018
  • Number of updates: 8
  • Update frequency: every 137.8 days
  • Top authors: shahpranaf (100%)

Code review

54 tests

User reviews

81 reviews

Install metrics

30,000+ active /263,427 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.65MB] [CPU: ▼15.32ms] Passed 4 tests

Analyzing server-side resources used by Hide Featured Image
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.86 ▼0.95
Dashboard /wp-admin3.37 ▲0.0647.60 ▼1.85
Posts /wp-admin/edit.php3.42 ▲0.0645.30 ▼2.31
Add New Post /wp-admin/post-new.php3.15 ▼2.7434.49 ▼56.16
Media Library /wp-admin/upload.php3.29 ▲0.0636.73 ▲3.14
Hide Featured Image /wp-admin/options-general.php?page=sh_hide_options3.2630.78

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hide Featured Image
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.26 ▼0.381.71 ▼0.0241.21 ▼2.40
Dashboard /wp-admin2,202 ▲225.57 ▼0.0789.19 ▼9.4240.92 ▼3.74
Posts /wp-admin/edit.php2,104 ▲71.99 ▲0.0034.84 ▼2.1733.74 ▼2.88
Add New Post /wp-admin/post-new.php6,226 ▲4,70026.06 ▲2.59892.70 ▲200.7556.14 ▼0.24
Media Library /wp-admin/upload.php1,401 ▼24.14 ▼0.01103.19 ▲7.0445.45 ▼1.01
Hide Featured Image /wp-admin/options-general.php?page=sh_hide_options9252.0324.1527.77

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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 no errors were found, this is by no means 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hide-featured-image/index.php:22

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

readme.txt 94% 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:
  • Plugin Name: Please specify the plugin name on the first line ( === hide-featured-image === )
You can take inspiration from this readme.txt

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

This is the main PHP file of "Hide Featured Image" version 1.3.1, 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:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hide-featured-image.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin229 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13946155
PO File1151574

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions8
▷ Named functions8100.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