83% wp-post-disclaimer

Code Review | WP Post Disclaimer

WordPress plugin WP Post Disclaimer scored83%from 54 tests.

About plugin

  • Plugin page: wp-post-disclaimer
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 10, 2020
  • Latest release: May 25, 2022
  • Number of updates: 5
  • Update frequency: every 173.2 days
  • Top authors: krunalprajapati41 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /9,917 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼5.39ms] Passed 4 tests

Analyzing server-side resources used by WP Post Disclaimer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.96 ▼4.18
Dashboard /wp-admin3.47 ▲0.1752.26 ▼2.33
Posts /wp-admin/edit.php3.58 ▲0.2351.15 ▲1.02
Add New Post /wp-admin/post-new.php6.05 ▲0.1790.51 ▼16.07
Media Library /wp-admin/upload.php3.39 ▲0.1740.28 ▲4.45
WP Post Disclaimer /wp-admin/options-general.php?page=wppd-disclaimer-settings3.4437.63

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 8 new options
New WordPress options
wppd_plugin_version
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
wppd_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Post Disclaimer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.24 ▼0.401.68 ▼0.5045.08 ▲4.08
Dashboard /wp-admin2,202 ▲225.58 ▼0.0893.65 ▲0.7843.28 ▼0.97
Posts /wp-admin/edit.php2,104 ▲12.03 ▼0.0039.60 ▼3.6334.17 ▼6.07
Add New Post /wp-admin/post-new.php1,531 ▲323.37 ▲0.26659.08 ▼25.8954.66 ▼15.50
Media Library /wp-admin/upload.php1,407 ▲74.10 ▼0.10102.45 ▲7.4145.21 ▼0.78
WP Post Disclaimer /wp-admin/options-general.php?page=wppd-disclaimer-settings1,7815.90116.7061.76

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-post-disclaimer/includes/font-awesome.php:9

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 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Requires php: The plugin version is formatted incorrectly
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Requires at least: The plugin version is formatted incorrectly
You can look at the official readme.txt

wp-post-disclaimer/wp-post-disclaimer.php Passed 13 tests

The main file in "WP Post Disclaimer" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
136 characters long description:
Add a disclaimer/terms/warnings about post/page/custom post type on top, bottom of content as well as inside post content with shortcode

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin12,938 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,026
CSS41,460263,126
PHP879289766
XML10020

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity43.50
▷ Minimum class complexity19.00
▷ Maximum class complexity68.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin