74% ar-registration-secure-spam-blocker

Code Review | ARS Reg Secure

WordPress plugin ARS Reg Secure scored74%from 54 tests.

About plugin

  • Plugin page: ar-registration-s...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.8
  • WordPress version: 6.3.1
  • First release: Dec 19, 2013
  • Latest release: Dec 19, 2013
  • Number of updates: 18
  • Update frequency: N/A
  • Top authors: arijose (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,394 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.90MB] [CPU: ▼53.04ms] Passed 4 tests

Analyzing server-side resources used by ARS Reg Secure
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.62 ▼15.33
Dashboard /wp-admin2.05 ▼1.265.63 ▼48.66
Posts /wp-admin/edit.php2.05 ▼1.316.75 ▼49.40
Add New Post /wp-admin/post-new.php2.05 ▼3.847.18 ▼84.32
Media Library /wp-admin/upload.php2.05 ▼1.185.68 ▼29.76

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ARS Reg Secure
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.33 ▼1.412.13 ▲0.0942.37 ▼1.86
Dashboard /wp-admin2,227 ▲365.85 ▼0.04102.20 ▼4.3343.52 ▲4.34
Posts /wp-admin/edit.php2,110 ▲242.01 ▼0.0140.28 ▲3.5436.27 ▲4.68
Add New Post /wp-admin/post-new.php1,552 ▲1918.39 ▼4.82606.96 ▼70.6058.07 ▲8.25
Media Library /wp-admin/upload.php1,409 ▲214.22 ▼0.0297.19 ▼14.7343.44 ▼4.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ars_css_styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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

SRP 50% from 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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ar-registration-secure-spam-blocker/includes/core.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ar-registration-secure-spam-blocker/ar-reg-secure.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ar-registration-secure-spam-blocker/includes/admin.php:7

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (/assets/ar-admin-form.png), #2 (/assets/example-custom-question.png)
Please take inspiration from this readme.txt

ar-registration-secure-spam-blocker/ar-reg-secure.php 92% from 13 tests

"ARS Reg Secure" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ar-registration-secure-spam-blocker.php" instead of "ar-reg-secure.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
No dangerous file extensions were detected82 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3392876
CSS1246

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
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%
Functions6
▷ Named functions6100.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 were not PNG files found in your plugin