90% damn-spam

Code Review | Damn Spam

WordPress plugin Damn Spam scored90%from 54 tests.

About plugin

  • Plugin page: damn-spam
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.1.1
  • WordPress version: 6.3.1
  • First release: Mar 19, 2019
  • Latest release: Mar 19, 2019
  • Number of updates: 12
  • Update frequency: every 0.1 days
  • Top authors: codetipi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /560 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼3.05ms] Passed 4 tests

A check of server-side resources used by Damn Spam
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.53 ▲2.25
Dashboard /wp-admin3.31 ▼0.0344.15 ▼12.22
Posts /wp-admin/edit.php3.36 ▲0.0148.58 ▲0.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.73 ▲1.64
Media Library /wp-admin/upload.php3.23 ▲0.0034.74 ▼1.97

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

Analyzing filesystem and database footprints of this plugin
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
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Damn Spam
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.46 ▲0.111.82 ▲0.2043.70 ▲1.82
Dashboard /wp-admin2,195 ▲185.63 ▲0.0484.11 ▼0.1738.62 ▼0.82
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0133.39 ▼0.5236.22 ▲0.78
Add New Post /wp-admin/post-new.php1,536 ▲818.69 ▼4.42593.44 ▼80.3462.47 ▲13.25
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0599.88 ▼14.7143.41 ▼4.52

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: anti-spam, comment spam, auto-spam links, comment links, damn spam...

damn-spam/damn-spam.php 92% from 13 tests

The main PHP script in "Damn Spam" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "4.8")

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 plugin87 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5188778
Markdown2309

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity3.33
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods666.67%
▷ Protected methods00.00%
▷ Private methods333.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected