54% ispam

Code Review | iSpam

WordPress plugin iSpam scored54%from 54 tests.

About plugin

  • Plugin page: ispam
  • Plugin version: 4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Nov 5, 2013
  • Latest release: Jan 19, 2021
  • Number of updates: 24
  • Update frequency: every 109.7 days
  • Top authors: KeyvaHardani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,001 total downloads

Benchmarks

Plugin footprint 30% 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.07MB] [CPU: ▼4.97ms] Passed 4 tests

A check of server-side resources used by iSpam
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.84 ▼7.91
Dashboard /wp-admin3.37 ▲0.0744.51 ▼2.25
Posts /wp-admin/edit.php3.49 ▲0.1345.95 ▼4.57
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.32 ▼5.15
Media Library /wp-admin/upload.php3.30 ▲0.0637.37 ▲2.58
Properties /wp-admin/admin.php?page=ispam_properties3.2630.81
Spam Folder /wp-admin/admin.php?page=ispam_spams3.2640.29

Server storage [IO: ▲0.27MB] [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: 9 new files
Database: 2 new tables, 10 new options
New tables
wp_dc_sp_log
wp_dc_sp_spam
New WordPress options
dc_sp_time_max
dc_sp_database_version
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
dc_sp_custom_message
db_upgraded
widget_recent-comments
dc_sp_time_delay
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for iSpam
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲5613.31 ▼1.272.01 ▼0.3639.66 ▼4.53
Dashboard /wp-admin2,233 ▲455.91 ▲1.02104.56 ▲3.0843.63 ▲0.69
Posts /wp-admin/edit.php2,119 ▲272.06 ▲0.0240.21 ▼1.4141.54 ▲6.07
Add New Post /wp-admin/post-new.php1,555 ▲2223.28 ▲0.11666.65 ▼8.8551.72 ▼1.97
Media Library /wp-admin/upload.php1,415 ▲274.23 ▲0.0594.81 ▼9.6442.31 ▼9.63
Properties /wp-admin/admin.php?page=ispam_properties8762.0523.4423.82
Spam Folder /wp-admin/admin.php?page=ispam_spams7952.0224.3726.23

Uninstaller [IO: ▲0.27MB] [DB: ▲0.00MB] 0% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Error in wp-content/plugins/ispam/ispam.php+51
    Uncaught Error: Call to undefined function mysql_query() in wp-content/plugins/ispam/ispam.php:51
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): dc_sp_uninstall()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(1269): do_action()
    #4 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • This plugin has failed uninstalling correctly, leaving 9 files (0.27MB) in the plugin directory
    • (new file) clouds/logs.php
    • (new file) screenshot-1.jpg
    • (new file) readme.txt
    • (new file) ispam.php
    • (new file) clouds/set_ini.php
    • (new file) clouds/ispam_options.php
    • (new file) clouds/ispam_spams.php
    • (new file) clouds/api.php
    • (new file) clouds/parse_class.php
  • Zombie tables detected upon uninstall: 2 tables
    • wp_dc_sp_log
    • wp_dc_sp_spam
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • dc_sp_database_version
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • dc_sp_time_max
    • dc_sp_custom_message
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • ...

Smoke tests 75% 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/ispam/ispam.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ispam/clouds/parse_class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ispam/clouds/set_ini.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ispam/clouds/logs.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (iSpam) image required
You can look at the official readme.txt

ispam/ispam.php Passed 13 tests

The principal PHP file in "iSpam" v. 4.0 is loaded by WordPress automatically on each request
68 characters long description:
iSpam Plugin ist a WordPress Spamming system for Control your Spams.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin353 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP713973353

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected