78% coded-hero-image-lite

Code Review | Coded Hero Image

WordPress plugin Coded Hero Image scored78%from 54 tests.

About plugin

  • Plugin page: coded-hero-image-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.5
  • WordPress version: 6.3.1
  • First release: Jun 6, 2018
  • Latest release: Jun 18, 2018
  • Number of updates: 6
  • Update frequency: every 3.0 days
  • Top authors: ctmusicnz (66.67%)craig7301 (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,004 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Coded Hero Image
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0727.98 ▼12.15
Dashboard /wp-admin3.34 ▲0.0448.57 ▼2.61
Posts /wp-admin/edit.php3.39 ▲0.0347.38 ▼1.64
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.19 ▼13.58
Media Library /wp-admin/upload.php3.26 ▲0.0339.34 ▲3.06

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

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

Browser metrics Passed 4 tests

Coded Hero Image: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲17613.88 ▼0.698.92 ▲7.2441.63 ▼4.25
Dashboard /wp-admin2,216 ▲365.71 ▲0.0392.03 ▼2.6496.06 ▲55.34
Posts /wp-admin/edit.php2,141 ▲412.27 ▲0.2833.61 ▼6.4334.47 ▼0.74
Add New Post /wp-admin/post-new.php1,555 ▲2923.71 ▲0.53690.99 ▼3.0438.62 ▼19.55
Media Library /wp-admin/upload.php1,433 ▲364.35 ▲0.17102.81 ▲0.3879.59 ▲29.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/coded-hero-image-lite/stylesheets/dynamic_style.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/coded-hero-image-lite/coded_hero_image.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: banner image, hero, banner, hero image

coded-hero-image-lite/coded_hero_image.php 85% from 13 tests

The main PHP script in "Coded Hero Image" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("coded-hero-image-lite.php" instead of "coded_hero_image.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
Good job! No executable or dangerous file extensions detected448 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP38725381
CSS217749
JavaScript20018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/coded_icon.png0.91KB0.98KB0.00%
img/down_arrow.png0.61KB0.35KB▼ 42.56%