78% i-agree-popups

Code Review | I Agree! Popups

WordPress plugin I Agree! Popups scored78%from 54 tests.

About plugin

  • Plugin page: i-agree-popups
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.5.1
  • WordPress version: 6.3.1
  • First release: Mar 1, 2016
  • Latest release: May 5, 2016
  • Number of updates: 9
  • Update frequency: every 55.6 days
  • Top authors: talismansolutions (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /10,381 total downloads

Benchmarks

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.15MB] [CPU: ▼19.20ms] Passed 4 tests

Analyzing server-side resources used by I Agree! Popups
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0240.46 ▼2.45
Dashboard /wp-admin3.23 ▼0.1134.80 ▼29.95
Posts /wp-admin/edit.php3.29 ▼0.0639.17 ▼12.98
Add New Post /wp-admin/post-new.php5.47 ▼0.4175.26 ▼28.57
Media Library /wp-admin/upload.php3.24 ▲0.0134.48 ▼5.30
Create Popup /wp-admin/post-new.php?post_type=i-agree-popup3.2740.85
All Popups /wp-admin/edit.php?post_type=i-agree-popup3.2739.63

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for I Agree! Popups
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.14 ▼1.031.81 ▼0.2643.78 ▲0.25
Dashboard /wp-admin2,235 ▲474.90 ▼0.98110.74 ▲4.1139.93 ▼2.02
Posts /wp-admin/edit.php2,121 ▲322.06 ▲0.0440.11 ▼2.1435.62 ▼1.43
Add New Post /wp-admin/post-new.php6,279 ▲4,75926.17 ▲3.03855.83 ▲174.5758.97 ▲4.65
Media Library /wp-admin/upload.php1,420 ▲354.22 ▼0.0796.91 ▼19.0343.65 ▼4.26
Create Popup /wp-admin/post-new.php?post_type=i-agree-popup2,7427.87186.3378.01
All Popups /wp-admin/edit.php?post_type=i-agree-popup1,0792.0029.9231.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=i-agree-popup
    • > Notice in wp-content/plugins/i-agree-popups/includes/i-agree-wp-footer.php+201
    Undefined variable: swOrsp

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/i-agree-popups/includes/i-agree-post-metaboxes.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (I Agree! Popups), #2 (A popup set to appear 'Sitewide'), #3 (Sitewide popup in action), #4 (Creating a popup for use on a single page), #5 (Assigning the popup to the stock WordPress Sample Page), #6 (Sample Page popup in action)
You can look at the official readme.txt

i-agree-popups/i-agree-popups.php Passed 13 tests

The primary PHP file in "I Agree! Popups" version 1.0 is used by WordPress to initiate all plugin functionality
105 characters long description:
Creates T&C and disclaimer popups for use across your whole WordPress site or individual posts and pages.

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
There were no executable files found in this plugin2,975 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13221941,807
PHP9230326712
CSS24436456

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.75
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods3386.84%
▷ Protected methods513.16%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 1.21MB with 0.81MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png286.62KB92.63KB▼ 67.68%
screenshot-4.png284.94KB92.52KB▼ 67.53%
screenshot-5.png240.30KB80.90KB▼ 66.33%
screenshot-3.png160.87KB59.16KB▼ 63.22%
screenshot-1.png83.89KB24.41KB▼ 70.91%