89% restrict-content-pro-getresponse

Code Review | Restrict Content Pro - GetResponse

WordPress plugin Restrict Content Pro - GetResponse scored89%from 54 tests.

About plugin

  • Plugin page: restrict-content-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 4, 2015
  • Latest release: May 4, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: section214 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /909 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.07ms] Passed 4 tests

A check of server-side resources used by Restrict Content Pro - GetResponse
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0547.85 ▲3.50
Dashboard /wp-admin3.36 ▲0.0553.10 ▼3.48
Posts /wp-admin/edit.php3.41 ▲0.0549.42 ▼7.94
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.59 ▼26.29
Media Library /wp-admin/upload.php3.28 ▲0.0538.78 ▲1.45
GetResponse /wp-admin/admin.php?page=rcp-getresponse3.2537.37

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Restrict Content Pro - GetResponse: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.46 ▲0.111.86 ▼0.3243.03 ▼0.37
Dashboard /wp-admin2,195 ▲245.51 ▼0.0897.17 ▲8.6943.21 ▼2.45
Posts /wp-admin/edit.php2,097 ▼31.98 ▲0.0235.48 ▼2.9133.95 ▼4.01
Add New Post /wp-admin/post-new.php1,526 ▼223.04 ▼0.31686.21 ▲32.8552.58 ▼2.99
Media Library /wp-admin/upload.php1,397 ▼04.20 ▼0.03102.51 ▼4.7446.45 ▼0.29
GetResponse /wp-admin/admin.php?page=rcp-getresponse8492.0326.3834.42

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

restrict-content-pro-getresponse/rcp-getresponse.php 85% from 13 tests

Analyzing the main PHP file in "Restrict Content Pro - GetResponse" version 1.0.0
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("restrict-content-pro-getresponse.php" instead of "rcp-getresponse.php")

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 detected348 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP392226348

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity16.50
▷ Minimum class complexity14.00
▷ Maximum class complexity19.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods210.53%
▷ Public methods1473.68%
▷ Protected methods315.79%
▷ Private methods210.53%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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