99% 4cgandhi

Code Review | 4cgandhi

WordPress plugin 4cgandhi scored 99% from 54 tests.

About plugin

  • Plugin page: 4cgandhi
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3+
  • WordPress version: 5.9.2
  • First release: Jan 19, 2021
  • Latest release: Jan 19, 2021
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: jay_patel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 256 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼300.43ms] Passed 4 tests

Analyzing server-side resources used by 4cgandhi
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0154.43 ▲1.73
Dashboard /wp-admin3.41 ▲0.0034.16 ▲1.39
Posts /wp-admin/edit.php3.64 ▲0.0038.11 ▼0.19
Add New Post /wp-admin/post-new.php6.88 ▼0.0994.03 ▼1,204.64
Media Library /wp-admin/upload.php3.29 ▲0.0027.69 ▲4.05

Server storage [IO: ▲0.07MB] [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: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for 4cgandhi
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,791 ▲3715.87 ▼0.086.71 ▲0.422.47 ▼0.49
Dashboard /wp-admin2,892 ▲386.01 ▼0.27116.04 ▼28.56152.50 ▼4.80
Posts /wp-admin/edit.php2,694 ▲93.24 ▲0.0063.25 ▲0.41142.26 ▼0.55
Add New Post /wp-admin/post-new.php1,711 ▲5020.76 ▲4.69434.29 ▼3.01145.36 ▼12.05
Media Library /wp-admin/upload.php1,698 ▼05.55 ▲0.02144.50 ▲4.07187.39 ▲5.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tested up to: The plugin version is formatted incorrectly
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (plugin_settings.png), #2 (display-frontend-demo.png)
  • Requires php: The plugin version is formatted incorrectly
The official readme.txt might help

4cgandhi/4cgandhi.php 92% from 13 tests

"4cgandhi" version 1.0'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:
  • Description: Please keep the plugin description shorter than 140 characters (currently 209 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin877 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3512262816
PHP1101652
CSS1009

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin