83% blockalyzer-stop-adblock-extension

Code Review | BlockAlyzer - Stop Adblock extension

WordPress plugin BlockAlyzer - Stop Adblock extension scored83%from 54 tests.

About plugin

  • Plugin page: blockalyzer-stop-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 28, 2014
  • Latest release: May 28, 2014
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: ypraise (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
Install script ran successfully

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

A check of server-side resources used by BlockAlyzer - Stop Adblock extension
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.27 ▼2.38
Dashboard /wp-admin3.31 ▼0.0347.99 ▼13.39
Posts /wp-admin/edit.php3.36 ▲0.0148.47 ▲4.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.27 ▼9.94
Media Library /wp-admin/upload.php3.23 ▲0.0133.27 ▼2.41
Stop Adblock /wp-admin/options-general.php?page=stopadblock3.2028.42

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by BlockAlyzer - Stop Adblock extension
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.16 ▼1.191.75 ▼0.0542.31 ▲0.72
Dashboard /wp-admin2,210 ▲225.81 ▼0.0995.08 ▼23.7638.60 ▼5.16
Posts /wp-admin/edit.php2,093 ▲42.18 ▲0.1739.47 ▲3.5835.72 ▲1.22
Add New Post /wp-admin/post-new.php1,531 ▼218.17 ▼4.92647.81 ▼26.3851.40 ▼0.87
Media Library /wp-admin/upload.php1,392 ▲44.19 ▼0.0394.61 ▼13.7141.58 ▼4.65
Stop Adblock /wp-admin/options-general.php?page=stopadblock7882.0623.7724.33

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 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/blockalyzer-stop-adblock-extension/stopadblock.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Contributors: Plugin contributors not specified
  • Screenshots: Screenshot #1 (Settings page) image missing
The official readme.txt is a good inspiration

blockalyzer-stop-adblock-extension/stopadblock.php 92% from 13 tests

"BlockAlyzer - Stop Adblock extension" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("blockalyzer-stop-adblock-extension.php" instead of "stopadblock.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
There were no executable files found in this plugin58 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2311058

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions4
▷ Named functions4100.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