89% wp-jquery-spam

Code Review | WP jQuery Spam

WordPress plugin WP jQuery Spam scored 89% from 54 tests.

About plugin

  • Plugin page: wp-jquery-spam
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.8.1
  • WordPress version: 5.8.1
  • First release: Dec 6, 2013
  • Latest release: Jan 26, 2014
  • Number of updates: 6
  • Update frequency: every 8.5 days
  • Top authors: Soar360 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 915 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by WP jQuery Spam
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1336.27 ▲10.74
Dashboard /wp-admin3.07 ▲0.0155.52 ▲10.59
Posts /wp-admin/edit.php3.12 ▲0.0144.22 ▼1.36
Add New Post /wp-admin/post-new.php5.43 ▼0.0188.02 ▼564.09
Media Library /wp-admin/upload.php3.01 ▲0.0132.02 ▼0.42

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP jQuery Spam
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.90 ▲0.2212.67 ▲0.1743.62 ▼7.98
Dashboard /wp-admin2,967 ▲365.90 ▼0.18146.94 ▼15.55120.36 ▲13.90
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0066.33 ▼2.8888.00 ▲0.35
Add New Post /wp-admin/post-new.php1,683 ▲9218.51 ▼2.08398.97 ▼9.18106.43 ▼6.48
Media Library /wp-admin/upload.php1,807 ▼05.04 ▼0.01153.32 ▼7.64114.30 ▲5.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-jquery-spam/dynamic.php
  • 2× 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/wp-jquery-spam/wp-jquery-spam.php:19
    • > PHP Notice
      Undefined index: id in wp-content/plugins/wp-jquery-spam/dynamic.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: junk, pinglunla, comments, spam, jquery

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

The main PHP file in "WP jQuery Spam" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
65 characters long description:
利用jQuer插入评论隐藏域达到防止垃圾评论的目的

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected55 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP30955

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.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 are no PNG files in this plugin