78% hmk-add-images-for-categories-and-pages

Code Review | Featured Image for Categories and pages.

WordPress plugin Featured Image for Categories and pages. scored 78% from 54 tests.

About plugin

  • Plugin page: hmk-add-images-fo...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Nov 29, 2013
  • Latest release: Mar 19, 2018
  • Number of updates: 22
  • Update frequency: every 71.4 days
  • Top authors: XpertOne (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 6,820 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
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.56ms] Passed 4 tests

A check of server-side resources used by Featured Image for Categories and pages.
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0846.74 ▲5.84
Dashboard /wp-admin3.42 ▲0.1263.05 ▼2.43
Posts /wp-admin/edit.php3.54 ▲0.1858.22 ▼4.28
Add New Post /wp-admin/post-new.php6.01 ▲0.12114.56 ▼5.84
Media Library /wp-admin/upload.php3.35 ▲0.1244.25 ▲2.30
HMK Add Images /wp-admin/options-general.php?page=zci-options3.2943.86

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

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

Browser metrics Passed 4 tests

Featured Image for Categories and pages.: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲814.84 ▲1.671.82 ▼0.6449.07 ▼4.73
Dashboard /wp-admin2,212 ▲124.83 ▼0.10118.68 ▼5.4542.89 ▼11.78
Posts /wp-admin/edit.php2,098 ▲61.99 ▼0.0044.72 ▼1.0746.68 ▲4.02
Add New Post /wp-admin/post-new.php1,536 ▲223.37 ▲0.30677.31 ▼71.4154.89 ▲3.34
Media Library /wp-admin/upload.php1,394 ▲64.22 ▲0.03108.38 ▼16.7450.81 ▼2.96
HMK Add Images /wp-admin/options-general.php?page=zci-options8162.0238.9838.74

Uninstaller [IO: ✅] [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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=zci-options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=zci-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/hmk-add-images-for-categories-and-pages/hmk-adds-images.php:15

User-side errors Passed 1 test

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

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:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

hmk-add-images-for-categories-and-pages/hmk-adds-images.php 92% from 13 tests

The main PHP file in "Featured Image for Categories and pages." ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("hmk-add-images-for-categories-and-pages.php" instead of "hmk-adds-images.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin552 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP148141415
PO File3232998
CSS23039

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/placeholder.png27.87KB11.37KB▼ 59.19%