78% easy-country-spam-blocker

Code Review | Easy Country Spam Blocker

WordPress plugin Easy Country Spam Blocker scored78%from 54 tests.

About plugin

  • Plugin page: easy-country-spam...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.4
  • WordPress version: 6.3.1
  • First release: Oct 7, 2019
  • Latest release: Apr 1, 2020
  • Number of updates: 16
  • Update frequency: every 11.3 days
  • Top authors: mediuminteractive (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /914 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼24.61ms] Passed 4 tests

This is a short check of server-side resources used by Easy Country Spam Blocker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1544.60 ▲2.67
Dashboard /wp-admin3.45 ▲0.1447.21 ▼32.88
Posts /wp-admin/edit.php3.57 ▲0.2150.49 ▼32.99
Add New Post /wp-admin/post-new.php6.05 ▲0.1683.29 ▼24.56
Media Library /wp-admin/upload.php3.38 ▲0.1437.45 ▼8.01
Easy Country Spam Blocker /wp-admin/options-general.php?page=mi-ecsb3.3734.94

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

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

Browser metrics Passed 4 tests

Easy Country Spam Blocker: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲15113.54 ▼1.148.41 ▲6.3943.16 ▲0.28
Dashboard /wp-admin2,211 ▲295.81 ▲0.83102.09 ▼69.0340.44 ▼42.41
Posts /wp-admin/edit.php2,100 ▲72.03 ▲0.0336.70 ▼35.4331.86 ▼30.80
Add New Post /wp-admin/post-new.php1,524 ▼1423.42 ▼0.16659.09 ▼161.7265.45 ▼0.16
Media Library /wp-admin/upload.php1,399 ▲114.23 ▲0.11108.78 ▼11.1846.84 ▼7.02
Easy Country Spam Blocker /wp-admin/options-general.php?page=mi-ecsb3,5721.9731.7249.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/easy-country-spam-blocker/public/partials/mi-ecsb-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'EasyCountrySpamBlocker_Helper' not found in wp-content/plugins/easy-country-spam-blocker/admin/partials/mi-ecsb-admin-display.php:16

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 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes: Please take inspiration from this readme.txt

easy-country-spam-blocker/mi-ecsb.php 85% from 13 tests

Analyzing the main PHP file in "Easy Country Spam Blocker" version 1.1.1
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-country-spam-blocker.php" instead of "mi-ecsb.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
Good job! No executable or dangerous file extensions detected1,512 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15216897979
CSS2408285
JavaScript26091248

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.60
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods54
▷ Static methods1935.19%
▷ Public methods4379.63%
▷ Protected methods00.00%
▷ Private methods1120.37%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected