10% wangguard-registration-notice-add-on

Code Review | WangGuard Registration Notice Add-on

WordPress plugin WangGuard Registration Notice Add-on scored10%from 54 tests.

About plugin

  • Plugin page: wangguard-registr...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.5
  • WordPress version: 6.3.1
  • First release: Apr 22, 2014
  • Latest release: Jun 7, 2016
  • Number of updates: 6
  • Update frequency: every 129.7 days
  • Top authors: j.conti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,064 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Parse error in wp-content/plugins/wangguard-registration-notice-add-on/wangguard-registration-add-on.php+213
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.37ms] Passed 4 tests

This is a short check of server-side resources used by WangGuard Registration Notice Add-on
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.83 ▼5.47
Dashboard /wp-admin3.31 ▲0.0045.57 ▼0.83
Posts /wp-admin/edit.php3.36 ▲0.0045.65 ▲2.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.69 ▼1.82
Media Library /wp-admin/upload.php3.23 ▲0.0038.76 ▲5.12

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

WangGuard Registration Notice Add-on: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.14 ▼1.241.79 ▲0.1640.89 ▼9.40
Dashboard /wp-admin2,206 ▲184.88 ▼1.02106.34 ▼0.9041.02 ▼5.02
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.1340.36 ▲3.6735.03 ▲4.66
Add New Post /wp-admin/post-new.php1,538 ▲1022.94 ▲4.44602.46 ▼7.3759.32 ▲11.95
Media Library /wp-admin/upload.php1,388 ▼04.15 ▼0.05107.50 ▲5.6341.20 ▼4.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/wangguard-registration-notice-add-on/wangguard-registration-add-on.php on line 213

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: buddypress, registration notice, notice, wgg, wangguardaddon...

wangguard-registration-notice-add-on/wangguard-registration-add-on.php 85% from 13 tests

The entry point to "WangGuard Registration Notice Add-on" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 225 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wangguard-registration-notice-add-on.php" instead of "wangguard-registration-add-on.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin137 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35365137

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin