90% lh-zero-spam

Code Review | LH Zero Spam

WordPress plugin LH Zero Spam scored90%from 54 tests.

About plugin

  • Plugin page: lh-zero-spam
  • Plugin version: 1.13
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 14, 2015
  • Latest release: Oct 14, 2022
  • Number of updates: 21
  • Update frequency: every 126.1 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /5,995 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.94ms] Passed 4 tests

Analyzing server-side resources used by LH Zero Spam
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.31 ▼2.48
Dashboard /wp-admin3.34 ▲0.0444.75 ▼8.70
Posts /wp-admin/edit.php3.45 ▲0.1046.83 ▲1.24
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.79 ▼21.16
Media Library /wp-admin/upload.php3.26 ▲0.0332.28 ▼3.41

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

LH Zero Spam: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.28 ▼1.301.83 ▲0.0443.61 ▼1.78
Dashboard /wp-admin2,203 ▲155.81 ▲0.9198.47 ▼16.4838.85 ▼7.89
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0034.37 ▼2.7441.37 ▲9.21
Add New Post /wp-admin/post-new.php1,526 ▼723.27 ▼0.07632.83 ▼43.6450.52 ▼10.37
Media Library /wp-admin/upload.php1,388 ▼04.42 ▲0.2294.36 ▼3.9241.82 ▼4.67

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% 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
10 plugin tags: comments, spam free, anti-spam, antispam, spam blocker...

lh-zero-spam/lh-zero-spam.php 92% from 13 tests

"LH Zero Spam" version 1.13's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin376 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP332541316
JavaScript252060

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity43.00
▷ Minimum class complexity36.00
▷ Maximum class complexity50.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods1032.26%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin