10% spamlord

Code Review | SpamLord

WordPress plugin SpamLord scored 10% from 54 tests.

About plugin

  • Plugin page: spamlord
  • Plugin version: 0.667
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 5.9.2
  • First release: Feb 11, 2014
  • Latest release: Aug 18, 2016
  • Number of updates: 23
  • Update frequency: every 40.0 days
  • Top authors: datadigita (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active / 3,235 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/spamlord/spamlord.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; SpamLord has a deprecated constructor

Server metrics [RAM: ▼2.27MB] [CPU: ▼362.69ms] Passed 4 tests

Server-side resources used by SpamLord
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.425.87 ▼55.22
Dashboard /wp-admin2.12 ▼1.294.49 ▼29.17
Posts /wp-admin/edit.php2.12 ▼1.524.54 ▼32.18
Add New Post /wp-admin/post-new.php2.12 ▼4.854.10 ▼1,334.20
Media Library /wp-admin/upload.php2.12 ▼1.184.82 ▼18.36
SpamLord /wp-admin/options-general.php?page=spamlord2.124.92

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 1 new option
New WordPress options
spamlord

Browser metrics Passed 4 tests

SpamLord: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,782 ▲6015.95 ▲0.875.84 ▲0.272.31 ▲0.03
Dashboard /wp-admin2,916 ▲555.98 ▼0.20150.07 ▲13.00173.68 ▲2.73
Posts /wp-admin/edit.php2,695 ▲13.22 ▼0.0070.23 ▲4.49152.94 ▲3.18
Add New Post /wp-admin/post-new.php1,651 ▲1620.88 ▲1.81523.92 ▲36.33203.09 ▲13.43
Media Library /wp-admin/upload.php1,702 ▲45.52 ▼0.02177.86 ▲32.02217.60 ▼49.04
SpamLord /wp-admin/options-general.php?page=spamlord1,1412.3754.81185.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/spamlord/spamlord.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; SpamLord has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • spamlord

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=spamlord
    • > Deprecated in wp-content/plugins/spamlord/spamlord.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; SpamLord has a deprecated constructor

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spamlord/spamlord.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === spamlord === )
You can take inspiration from this readme.txt

spamlord/spamlord.php Passed 13 tests

"SpamLord" version 0.667's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
32 characters long description:
Never see your spam alive again.

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 plugin249 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16863245
CSS1004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity52.50
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods13.23%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
spamlord_screenicon.png3.87KB2.33KB▼ 39.96%