93% hello-gandhi

Code Review | Hello Gandhi

WordPress plugin Hello Gandhi scored 93% from 54 tests.

About plugin

  • Plugin page: hello-gandhi
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 5.8.1
  • First release: Oct 31, 2012
  • Latest release: Mar 6, 2014
  • Number of updates: 7
  • Update frequency: every 70.1 days
  • Top authors: adamsilverstein (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,527 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by Hello Gandhi
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1334.08 ▲12.18
Dashboard /wp-admin3.08 ▲0.0243.77 ▼0.37
Posts /wp-admin/edit.php3.13 ▲0.0243.57 ▼0.80
Add New Post /wp-admin/post-new.php5.44 ▼0.0084.70 ▼564.00
Media Library /wp-admin/upload.php3.02 ▲0.0231.65 ▼2.37

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Hello Gandhi: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,710 ▲11415.98 ▲0.489.24 ▼1.8948.01 ▼5.83
Dashboard /wp-admin2,999 ▲625.92 ▼0.22126.21 ▼20.53127.06 ▲18.35
Posts /wp-admin/edit.php2,743 ▲72.85 ▲0.0265.24 ▲1.65100.93 ▲17.17
Add New Post /wp-admin/post-new.php1,678 ▲17818.86 ▲0.13366.93 ▼6.51132.45 ▲19.78
Media Library /wp-admin/upload.php1,814 ▲45.04 ▲0.01188.39 ▲38.56149.50 ▲29.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hello-gandhi/hellogandhi.php:18

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 90% 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 require attention:
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

hello-gandhi/hellogandhi.php 85% from 13 tests

"Hello Gandhi" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 369 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hello-gandhi.php" instead of "hellogandhi.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin126 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1612126

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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 images were found in this plugin