89% pk-spam-registration-blocker

Code Review | Pk Spam Registration Blocker

WordPress plugin Pk Spam Registration Blocker scored89%from 54 tests.

About plugin

  • Plugin page: pk-spam-registrat...
  • Plugin version: 1.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2023
  • Latest release: Mar 25, 2023
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: phpsword (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /124 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▲0.33ms] Passed 4 tests

A check of server-side resources used by Pk Spam Registration Blocker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.24 ▲1.11
Dashboard /wp-admin3.40 ▲0.0948.34 ▼2.94
Posts /wp-admin/edit.php3.51 ▲0.1648.85 ▲1.49
Add New Post /wp-admin/post-new.php5.98 ▲0.0994.08 ▲2.16
Media Library /wp-admin/upload.php3.32 ▲0.0935.08 ▲1.64

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Pk Spam Registration Blocker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲17314.00 ▼0.228.95 ▲7.3438.73 ▼1.90
Dashboard /wp-admin2,229 ▲414.93 ▲0.01112.47 ▲7.1241.35 ▼0.61
Posts /wp-admin/edit.php2,112 ▲232.04 ▲0.0440.89 ▲2.5634.11 ▼0.84
Add New Post /wp-admin/post-new.php1,544 ▲2518.51 ▼4.65609.66 ▼36.6851.29 ▼1.00
Media Library /wp-admin/upload.php1,411 ▲264.25 ▲0.0394.88 ▼5.4939.83 ▼0.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

pk-spam-registration-blocker/pk-spam-registration-blocker.php 85% from 13 tests

The main PHP file in "Pk Spam Registration Blocker" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 287 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "5.2")

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
No dangerous file extensions were detected355 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP54382345
JavaScript10110

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity18.50
▷ Minimum class complexity17.00
▷ Maximum class complexity20.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/pkplugins-logo.png2.90KB1.45KB▼ 50.07%