90% wp-spam-protecter

Code Review | WP Spam Protecter

WordPress plugin WP Spam Protecter scored90%from 54 tests.

About plugin

  • Plugin page: wp-spam-protecter
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 29, 2018
  • Latest release: Nov 29, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: rajanit2000 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /572 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.20ms] Passed 4 tests

Server-side resources used by WP Spam Protecter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.92 ▲1.51
Dashboard /wp-admin3.35 ▲0.0545.77 ▼2.26
Posts /wp-admin/edit.php3.47 ▲0.1143.86 ▼3.71
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.66 ▼5.99
Media Library /wp-admin/upload.php3.28 ▲0.0432.37 ▼16.84

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Spam Protecter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.22 ▼1.011.73 ▼0.2243.65 ▼3.09
Dashboard /wp-admin2,213 ▲224.86 ▼0.96100.04 ▲0.4543.28 ▲2.02
Posts /wp-admin/edit.php2,090 ▼22.03 ▲0.0435.44 ▼7.0031.22 ▼7.41
Add New Post /wp-admin/post-new.php1,518 ▲423.34 ▲5.83671.36 ▼25.1051.19 ▼6.31
Media Library /wp-admin/upload.php1,395 ▲74.22 ▲0.0198.49 ▼7.8042.94 ▲1.26

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-spam-protecter/wp-spam-protecter.php Passed 13 tests

The entry point to "WP Spam Protecter" version 1.0.0 is a PHP file that has certain tags in its header comment area
72 characters long description:
Protuct your blog about spam comments and instantaneously junk messages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected180 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10119481174
JavaScript24546
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected