78% stop-spamco

Code Review | Stop SpamCo

WordPress plugin Stop SpamCo scored78%from 54 tests.

About plugin

  • Plugin page: stop-spamco
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Feb 18, 2013
  • Latest release: Feb 22, 2013
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: guitoun3 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,179 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
This plugin's installer ran successfully

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

Server-side resources used by Stop SpamCo
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.06 ▼0.28
Dashboard /wp-admin3.26 ▼0.0540.50 ▼9.37
Posts /wp-admin/edit.php3.38 ▲0.0250.13 ▼1.14
Add New Post /wp-admin/post-new.php5.91 ▲0.0299.46 ▼3.23
Media Library /wp-admin/upload.php3.25 ▲0.0235.45 ▼4.57

Server storage [IO: ▲0.01MB] [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: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Stop SpamCo
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.30 ▼0.291.89 ▼0.0240.70 ▼1.52
Dashboard /wp-admin2,203 ▲265.61 ▼0.0383.88 ▼2.5640.95 ▼5.89
Posts /wp-admin/edit.php2,108 ▲82.06 ▲0.0741.48 ▲1.3538.91 ▲2.89
Add New Post /wp-admin/post-new.php1,561 ▲1318.28 ▼5.12635.04 ▼31.6257.15 ▼5.53
Media Library /wp-admin/upload.php1,411 ▲114.28 ▲0.14100.67 ▼15.1642.42 ▼6.75
Stop SpamCo /wp-admin/stop-spamco-admin.php260.440.1013.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 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 50% 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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/stop-spamco/stop-spamco.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stop-spamco/stop-spamco-admin.php:64

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/stop-spamco-admin.php
    • > Network (severe)
    wp-admin/stop-spamco-admin.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Invalid url: ""
The official readme.txt might help

stop-spamco/stop-spamco.php Passed 13 tests

Analyzing the main PHP file in "Stop SpamCo" version 0.2
102 characters long description:
Filtrez les spammeurs en retirant le champ Website après x jours, ou en passant ces liens en NoFollow

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 plugin104 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23712104

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected