90% simple-age-restriction-warning

Code Review | Simple Age Restriction Warning

WordPress plugin Simple Age Restriction Warning scored90%from 54 tests.

About plugin

  • Plugin page: simple-age-restri...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Dec 25, 2017
  • Latest release: Jul 12, 2018
  • Number of updates: 13
  • Update frequency: every 15.3 days
  • Top authors: neevalex (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /4,558 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.57ms] Passed 4 tests

A check of server-side resources used by Simple Age Restriction Warning
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.07 ▼2.14
Dashboard /wp-admin3.31 ▲0.0148.08 ▼5.68
Posts /wp-admin/edit.php3.36 ▲0.0148.98 ▼1.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.19 ▼8.90
Media Library /wp-admin/upload.php3.23 ▲0.0141.87 ▲7.29

Server storage [IO: ▲0.05MB] [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: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Simple Age Restriction Warning: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲20713.56 ▼1.0316.26 ▲14.2948.11 ▲0.49
Dashboard /wp-admin2,192 ▲255.61 ▲0.0996.21 ▼15.9338.84 ▼4.29
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0838.70 ▲2.0635.31 ▼1.44
Add New Post /wp-admin/post-new.php1,526 ▼023.25 ▲0.34669.51 ▼38.4765.32 ▲2.60
Media Library /wp-admin/upload.php1,400 ▲34.18 ▼0.03105.79 ▼0.2646.02 ▼4.66

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 were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: adult content popup, adult content warning, 18, age restriction popup

simple-age-restriction-warning/simple-age-restriction-warning.php 92% from 13 tests

Analyzing the main PHP file in "Simple Age Restriction Warning" version 1.0.2
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
Good job! No executable or dangerous file extensions detected110 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS16448
JavaScript112334
PHP2162228

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin