89% restrict-content-pro-terms-and-conditions

Code Review | Restrict Content Pro - Terms and Conditions

WordPress plugin Restrict Content Pro - Terms and Conditions scored89%from 54 tests.

About plugin

  • Plugin page: restrict-content-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Apr 11, 2015
  • Latest release: Jul 2, 2016
  • Number of updates: 6
  • Update frequency: every 78.5 days
  • Top authors: abrudtkuhl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,302 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.04ms] Passed 4 tests

An overview of server-side resources used by Restrict Content Pro - Terms and Conditions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.95 ▼2.16
Dashboard /wp-admin3.34 ▲0.0351.31 ▼1.07
Posts /wp-admin/edit.php3.39 ▲0.0349.87 ▼1.47
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.57 ▼2.64
Media Library /wp-admin/upload.php3.26 ▲0.0337.13 ▼1.89

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Restrict Content Pro - Terms and Conditions
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.031.71 ▼0.6145.68 ▲0.24
Dashboard /wp-admin2,198 ▲185.65 ▼0.0184.93 ▼7.3239.11 ▲0.15
Posts /wp-admin/edit.php2,079 ▼212.00 ▲0.0435.06 ▼5.9834.32 ▼0.31
Add New Post /wp-admin/post-new.php1,526 ▼023.09 ▼0.56667.67 ▼72.5252.77 ▼8.65
Media Library /wp-admin/upload.php1,400 ▼34.10 ▼0.08109.10 ▲11.6648.17 ▲3.93

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: restrict content pro

restrict-content-pro-terms-and-conditions/rcp-require-terms.php 77% from 13 tests

The principal PHP file in "Restrict Content Pro - Terms and Conditions" v. 1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/lang/" does not exist
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("restrict-content-pro-terms-and-conditions.php" instead of "rcp-require-terms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin116 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12230113
Markdown1303

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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

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