84% accept-disclaimer-overlayer

Code Review | Accept Disclaimer Overlayer

WordPress plugin Accept Disclaimer Overlayer scored 84% from 54 tests.

About plugin

  • Plugin page: accept-disclaimer...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8.1
  • WordPress version: 5.9.2
  • First release: Feb 20, 2014
  • Latest release: Aug 9, 2014
  • Number of updates: 7
  • Update frequency: every 24.3 days
  • Top authors: mindloop (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 3,719 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.00MB] [CPU: ▼300.52ms] Passed 4 tests

Analyzing server-side resources used by Accept Disclaimer Overlayer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0354.71 ▲3.95
Dashboard /wp-admin3.44 ▲0.0334.96 ▲1.19
Posts /wp-admin/edit.php3.67 ▲0.0339.85 ▲1.44
Add New Post /wp-admin/post-new.php6.91 ▼0.0794.00 ▼1,203.92
Media Library /wp-admin/upload.php3.32 ▲0.0224.86 ▼0.77

Server storage [IO: ▲0.23MB] [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: 9 new files
Database: no new tables, 5 new options
New WordPress options
mind_disclaimer_title
mind_accept_text
mind_disclaimer_show_once
mind_disclaimer_text
mind_disclaimer_sidewide

Browser metrics Passed 4 tests

This is an overview of browser requirements for Accept Disclaimer Overlayer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,949 ▲22716.29 ▲0.3310.32 ▲3.223.00 ▲0.47
Dashboard /wp-admin2,912 ▲516.11 ▼0.07117.56 ▼20.04158.96 ▼6.31
Posts /wp-admin/edit.php2,677 ▼113.24 ▲0.0064.82 ▲1.57132.86 ▼12.41
Add New Post /wp-admin/post-new.php1,792 ▲8122.16 ▲0.80482.18 ▲29.47161.15 ▲8.22
Media Library /wp-admin/upload.php1,715 ▲145.54 ▲0.01138.69 ▼6.37189.12 ▲2.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 5 options
    • mind_disclaimer_title
    • mind_disclaimer_sidewide
    • mind_disclaimer_text
    • mind_accept_text
    • mind_disclaimer_show_once

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/accept-disclaimer-overlayer/includes/view_admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/accept-disclaimer-overlayer/index.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (How it looks screenshot-1.(png|jpg|jpeg|gif)), #2 (The admin interface screenshot-2.(png|jpg|jpeg|gif))
You can look at the official readme.txt

accept-disclaimer-overlayer/index.php 92% from 13 tests

"Accept Disclaimer Overlayer" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("accept-disclaimer-overlayer.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin243 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32689142
CSS16051
JavaScript19450

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods787.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
3 PNG files occupy 0.22MB with 0.13MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png120.84KB40.25KB▼ 66.69%
assets/screenshot-1.png106.88KB32.14KB▼ 69.93%
images/transp_black_90.png0.16KB0.10KB▼ 40.36%