83% rta-restricted-to-adults-header

Code Review | RTA - Restricted To Adult

WordPress plugin RTA - Restricted To Adult scored83%from 54 tests.

About plugin

  • Plugin page: rta-restricted-to...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0.3
  • WordPress version: 6.3.1
  • First release: Feb 5, 2019
  • Latest release: Feb 6, 2019
  • Number of updates: 16
  • Update frequency: every 1.1 days
  • Top authors: joe@jmjwebsitedesign.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,290 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
Installer ran successfully

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

A check of server-side resources used by RTA - Restricted To Adult
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.93 ▼2.18
Dashboard /wp-admin3.31 ▼0.0441.97 ▼17.87
Posts /wp-admin/edit.php3.36 ▲0.0142.37 ▼2.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.58 ▼13.47
Media Library /wp-admin/upload.php3.23 ▲0.0035.05 ▼2.46

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

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

Browser metrics Passed 4 tests

A check of browser resources used by RTA - Restricted To Adult
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲1914.38 ▲0.021.79 ▼0.0143.69 ▲3.70
Dashboard /wp-admin2,195 ▲145.67 ▼0.0485.43 ▼17.8838.18 ▼6.07
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0835.18 ▼4.9631.35 ▼4.35
Add New Post /wp-admin/post-new.php1,526 ▼223.83 ▲0.69683.57 ▲12.4562.03 ▼8.25
Media Library /wp-admin/upload.php1,394 ▼04.17 ▼0.0495.21 ▼6.4544.96 ▼0.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rta-restricted-to-adults-header/rta_restricted_to_adults.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: restricted to adults, adult wordpress, child protection, rta header, rta

rta-restricted-to-adults-header/rta_restricted_to_adults.php 77% from 13 tests

This is the main PHP file of "RTA - Restricted To Adult" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rta-restricted-to-adults-header.php" instead of "rta_restricted_to_adults.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 249 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Good job! No executable or dangerous file extensions detected6 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12156

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
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
PNG images were not found in this plugin