84% accept-disclaimer-overlayer

Code Review | Accept Disclaimer Overlayer

WordPress plugin Accept Disclaimer Overlayer scored84%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: 6.3.1
  • 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

80+ active /3,972 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.06ms] Passed 4 tests

A check of server-side resources used by Accept Disclaimer Overlayer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0435.32 ▼0.53
Dashboard /wp-admin3.33 ▼0.0147.03 ▼14.61
Posts /wp-admin/edit.php3.38 ▲0.0245.71 ▲0.29
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.87 ▼13.37
Media Library /wp-admin/upload.php3.25 ▲0.0236.65 ▲2.15

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 11 new options
New WordPress options

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 /2,989 ▲24313.61 ▼0.586.59 ▲4.9540.25 ▼0.84
Dashboard /wp-admin2,222 ▲304.86 ▼0.11116.61 ▲8.1340.25 ▼1.65
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0439.60 ▲5.9934.39 ▼0.72
Add New Post /wp-admin/post-new.php1,546 ▲423.43 ▲5.37652.15 ▲38.7257.48 ▼5.18
Media Library /wp-admin/upload.php1,404 ▲194.16 ▼0.04109.84 ▲14.6646.14 ▲3.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 11 options in the database
    • widget_theysaidso_widget
    • mind_disclaimer_text
    • mind_disclaimer_title
    • mind_disclaimer_sidewide
    • widget_recent-posts
    • theysaidso_admin_options
    • mind_accept_text
    • can_compress_scripts
    • db_upgraded
    • mind_disclaimer_show_once
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/accept-disclaimer-overlayer/index.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/accept-disclaimer-overlayer/includes/view_admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (How it looks screenshot-1.(png|jpg|jpeg|gif)), #2 (The admin interface screenshot-2.(png|jpg|jpeg|gif))
You can take inspiration from this readme.txt

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

The main PHP script in "Accept Disclaimer Overlayer" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same 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 | 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 plugin243 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
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
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods787.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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-1.png106.88KB32.14KB▼ 69.93%
images/transp_black_90.png0.16KB0.10KB▼ 40.36%
assets/screenshot-2.png120.84KB40.25KB▼ 66.69%