78% wpshore-contact-form-7-spam-prevention

Code Review | WPshore Contact Form 7 Spam Prevention

WordPress plugin WPshore Contact Form 7 Spam Prevention scored78%from 54 tests.

About plugin

  • Plugin page: wpshore-contact-f...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 6.3.1
  • First release: Jun 5, 2014
  • Latest release: Sep 22, 2014
  • Number of updates: 9
  • Update frequency: every 12.2 days
  • Top authors: nablasol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /958 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.06ms] Passed 4 tests

Server-side resources used by WPshore Contact Form 7 Spam Prevention
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.08 ▲2.58
Dashboard /wp-admin3.31 ▲0.0151.33 ▼0.31
Posts /wp-admin/edit.php3.36 ▲0.0151.09 ▼1.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.16 ▼19.86
Media Library /wp-admin/upload.php3.23 ▲0.0038.09 ▲1.56
Limit Spam /wp-admin/admin.php?page=cf7sp_third_party_submenu3.2031.44

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WPshore Contact Form 7 Spam Prevention
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.35 ▼0.001.80 ▼0.3743.43 ▲2.41
Dashboard /wp-admin2,198 ▲185.62 ▼0.0496.09 ▲1.6342.74 ▼2.16
Posts /wp-admin/edit.php2,097 ▼32.02 ▲0.0036.23 ▲0.4335.48 ▲0.69
Add New Post /wp-admin/post-new.php1,528 ▼023.20 ▲0.11674.99 ▲54.7270.67 ▲2.79
Media Library /wp-admin/upload.php1,394 ▼64.12 ▼0.0699.66 ▼1.0141.42 ▼6.78
Limit Spam /wp-admin/admin.php?page=cf7sp_third_party_submenu8011.9922.6627.83

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpshore-contact-form-7-spam-prevention/spam_prevention.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=cf7sp_third_party_submenu
    • > Network (severe)
    wp-content/plugins/cf7_spam_prevention/limit.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: limit spam, antispam, wpshore contact form 7, spam, captcha...

wpshore-contact-form-7-spam-prevention/spam_prevention.php 92% from 13 tests

The main PHP script in "WPshore Contact Form 7 Spam Prevention" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpshore-contact-form-7-spam-prevention.php" instead of "spam_prevention.php")

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
No dangerous file extensions were detected96 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110996

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ping-ping.png1.60KB0.98KB▼ 38.49%
limit.png11.72KB4.45KB▼ 62.07%