84% agreement

Code Review | Agreement

WordPress plugin Agreement scored 84% from 54 tests.

About plugin

  • Plugin page: agreement
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2013
  • Latest release: Dec 2, 2022
  • Number of updates: 23
  • Update frequency: every 147.2 days
  • Top authors: pranavpathakjaora (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active / 5,758 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.02MB] [CPU: ▼6.93ms] Passed 4 tests

An overview of server-side resources used by Agreement
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.57 ▼2.84
Dashboard /wp-admin3.33 ▲0.0346.43 ▼4.46
Posts /wp-admin/edit.php3.38 ▲0.0247.66 ▼1.02
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.34 ▼19.39
Media Library /wp-admin/upload.php3.25 ▲0.0239.22 ▲2.97
Agreement /wp-admin/options-general.php?page=agreement-setting-admin3.1928.79

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Agreement
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲17414.01 ▼0.575.53 ▲3.4840.23 ▼4.39
Dashboard /wp-admin2,210 ▲195.85 ▼0.04102.95 ▼0.6139.20 ▼3.70
Posts /wp-admin/edit.php2,093 ▲252.04 ▲0.0239.67 ▲5.3035.01 ▲0.71
Add New Post /wp-admin/post-new.php1,531 ▼1118.55 ▲0.23593.32 ▼12.5650.42 ▼0.17
Media Library /wp-admin/upload.php1,389 ▲14.25 ▲0.0897.45 ▲3.1940.91 ▼0.39
Agreement /wp-admin/options-general.php?page=agreement-setting-admin8022.0227.1829.23

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=agreement-setting-admin
    • > 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=agreement-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% 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:
  • Screenshots: These screenshots do not have images: #1 (Add id in media file link.), #2 (Change pop-up text in admin panel.), #3 (How it looks like in front end. UI may be differ as per your template.)
You can look at the official readme.txt

agreement/agreement.php Passed 13 tests

"Agreement" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
121 characters long description:
The Agreement plugin helps to create pop-up licence agreement or term to use before download any thing from post or page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin147 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2132990
CSS10027
JavaScript12522
HTML1208

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png35.04KB12.95KB▼ 63.03%
screenshot-3.png29.48KB11.90KB▼ 59.62%
screenshot-1.png11.38KB7.22KB▼ 36.58%