84% age-okay

Code Review | Age Okay

WordPress plugin Age Okay scored84%from 54 tests.

About plugin

  • Plugin page: age-okay
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.2
  • WordPress version: 6.3.1
  • First release: Jan 24, 2020
  • Latest release: May 10, 2023
  • Number of updates: 13
  • Update frequency: every 93.2 days
  • Top authors: codealtdel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /2,885 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼4.03ms] Passed 4 tests

Analyzing server-side resources used by Age Okay
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2041.86 ▲3.62
Dashboard /wp-admin3.51 ▲0.2049.89 ▲0.53
Posts /wp-admin/edit.php3.62 ▲0.2644.54 ▼3.34
Add New Post /wp-admin/post-new.php6.09 ▲0.2081.11 ▼16.31
Media Library /wp-admin/upload.php3.43 ▲0.2034.45 ▲3.00
Editor /wp-admin/admin.php?page=age-okay3.7338.30
Documentation /wp-admin/admin.php?page=age-okay-docs3.5535.57
Settings /wp-admin/admin.php?page=age-okay-settings3.5239.52
GET PRO /wp-admin/admin.php?page=age-okay-pro3.4434.06
Translations /wp-admin/admin.php?page=age-okay-trans3.4836.60

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Age Okay
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲20513.68 ▼0.709.41 ▲7.6142.95 ▲3.37
Dashboard /wp-admin2,265 ▲775.85 ▲0.03100.38 ▼3.0740.17 ▼3.57
Posts /wp-admin/edit.php2,151 ▲622.04 ▼0.0034.78 ▼0.0332.97 ▼0.52
Add New Post /wp-admin/post-new.php1,565 ▲4623.41 ▲0.29659.14 ▼7.2453.48 ▲1.78
Media Library /wp-admin/upload.php1,448 ▲604.21 ▲0.0393.40 ▼2.7442.27 ▼1.95
Editor /wp-admin/admin.php?page=age-okay4,5994.87149.7661.15
Documentation /wp-admin/admin.php?page=age-okay-docs1,6463.4041.1142.93
Settings /wp-admin/admin.php?page=age-okay-settings1,3953.4143.5429.28
GET PRO /wp-admin/admin.php?page=age-okay-pro1,2583.3540.8641.89
Translations /wp-admin/admin.php?page=age-okay-trans1,4133.4546.2047.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
Please fix the following items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/age-okay/admin/partials/age-okay-admin-translations.php:16
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/age-okay/admin/partials/age-okay-admin-editor.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/age-okay/admin/partials/age-okay-admin-settings.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/age-okay/admin/partials/age-okay-admin-pro.php:20
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/age-okay/public/partials/age-okay-public-verify.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/age-okay/admin/partials/age-okay-admin-docs.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

age-okay/age-okay.php Passed 13 tests

The main PHP file in "Age Okay" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
23 characters long description:
Age Verification Plugin

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
Everything looks great! No dangerous files found in this plugin4,737 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP172878042,096
CSS6204231,122
PO File13144281,029
JavaScript45652490

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity31.83
▷ Minimum class complexity1.00
▷ Maximum class complexity94.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods3877.55%
▷ Protected methods00.00%
▷ Private methods1122.45%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin