78% prepublish-checks-by-kgaurav

Code Review | PrePublish Checks by Kgaurav

WordPress plugin PrePublish Checks by Kgaurav scored78%from 54 tests.

About plugin

  • Plugin page: prepublish-checks...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 22, 2022
  • Latest release: May 14, 2023
  • Number of updates: 3
  • Update frequency: every 140.7 days
  • Top authors: kgaurav6791 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /355 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.62ms] Passed 4 tests

This is a short check of server-side resources used by PrePublish Checks by Kgaurav
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.80 ▼4.51
Dashboard /wp-admin3.37 ▲0.0650.57 ▲1.12
Posts /wp-admin/edit.php3.42 ▲0.0648.09 ▼4.41
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.99 ▼21.05
Media Library /wp-admin/upload.php3.29 ▲0.0638.58 ▼0.50
Prepublish Checks /wp-admin/options-general.php?page=prepublish_by_kgaurav_plugin3.2331.14

Server storage [IO: ▲0.06MB] [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: 3 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
prepublish_checks_by_kgaurav_settings_data
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for PrePublish Checks by Kgaurav
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.35 ▲0.081.67 ▼0.2448.29 ▲4.95
Dashboard /wp-admin2,202 ▲255.64 ▼0.0397.40 ▲5.1242.03 ▼1.54
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0339.88 ▲1.7933.14 ▼5.71
Add New Post /wp-admin/post-new.php1,531 ▲322.95 ▼0.07633.24 ▼53.5053.09 ▼7.73
Media Library /wp-admin/upload.php1,404 ▲14.16 ▼0.1194.52 ▼10.0943.58 ▼3.95
Prepublish Checks /wp-admin/options-general.php?page=prepublish_by_kgaurav_plugin9501.9923.5228.79

Uninstaller [IO: ▲0.00MB] [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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=prepublish_by_kgaurav_plugin
    • > 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=prepublish_by_kgaurav_plugin
    • > 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/prepublish-checks-by-kgaurav/prepublish-checks-by-kgaurav.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
You can look at the official readme.txt

prepublish-checks-by-kgaurav/prepublish-checks-by-kgaurav.php 92% from 13 tests

The main PHP file in "PrePublish Checks by Kgaurav" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 265 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin233 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14829233

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin