10% heroic-inspiration

Code Review | Heroic Inspiration

WordPress plugin Heroic Inspiration scored10%from 54 tests.

About plugin

  • Plugin page: heroic-inspiration
  • Plugin version: 1...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Dec 18, 2016
  • Latest release: Dec 18, 2016
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: nloadholtes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /563 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/heroic-inspiration/heroic-inspiration.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; HeroicInspWidget has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼55.93ms] Passed 4 tests

A check of server-side resources used by Heroic Inspiration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.408.76 ▼38.15
Dashboard /wp-admin2.08 ▼1.225.86 ▼48.19
Posts /wp-admin/edit.php2.08 ▼1.274.71 ▼50.11
Add New Post /wp-admin/post-new.php2.08 ▼3.806.70 ▼87.28
Media Library /wp-admin/upload.php2.08 ▼1.156.07 ▼27.97

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Heroic Inspiration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8213.54 ▼1.212.27 ▲0.2746.20 ▼2.67
Dashboard /wp-admin2,209 ▲184.86 ▼0.02101.15 ▼27.9638.85 ▼11.43
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0037.03 ▲0.9034.47 ▲0.35
Add New Post /wp-admin/post-new.php1,533 ▲523.39 ▲0.14650.96 ▼21.8055.59 ▼0.11
Media Library /wp-admin/upload.php1,385 ▼34.22 ▼0.01109.99 ▲3.4147.93 ▲0.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/heroic-inspiration/heroic-inspiration.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; HeroicInspWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • widget_recent-comments
    • widget_heroicinspwidget
    • theysaidso_admin_options
    • can_compress_scripts
    • heroicinsp_widget_plugin_db_version
    • widget_theysaidso_widget
    • widget_recent-posts

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/heroic-inspiration/trunk/heroic-inspiration.php:18
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/heroic-inspiration/heroic-inspiration.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/heroic-inspiration/heroic-inspiration.php:18
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/heroic-inspiration/trunk/heroic-inspiration.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (heroic-inspiration-screenshot.png) image not found
The official readme.txt is a good inspiration

heroic-inspiration/heroic-inspiration.php 92% from 13 tests

"Heroic Inspiration" version 1...'s primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "1...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected83 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1211083

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/heroic-inspiration-screenshot.png6.75KB4.18KB▼ 38.02%
trunk/assets/heroic-inspiration-screenshot.png6.75KB4.18KB▼ 38.02%