78% simple-adblock-redirect

Code Review | AdBlockly

WordPress plugin AdBlockly scored78%from 54 tests.

About plugin

  • Plugin page: simple-adblock-re...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 5, 2018
  • Latest release: Jun 8, 2018
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: fahminlb33 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /817 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
Install script ran successfully

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

Server-side resources used by AdBlockly
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.92 ▼1.39
Dashboard /wp-admin3.31 ▼0.0352.63 ▼6.14
Posts /wp-admin/edit.php3.37 ▲0.0150.79 ▲1.71
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.72 ▼16.16
Media Library /wp-admin/upload.php3.24 ▲0.0137.28 ▲0.31

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

AdBlockly: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.37 ▼0.031.84 ▲0.0343.88 ▲1.00
Dashboard /wp-admin2,211 ▲315.53 ▼0.1584.67 ▼10.5540.67 ▼2.92
Posts /wp-admin/edit.php2,116 ▲342.03 ▲0.0139.71 ▲4.8335.35 ▼0.06
Add New Post /wp-admin/post-new.php1,563 ▲3222.81 ▼0.51670.64 ▼37.3853.37 ▼6.46
Media Library /wp-admin/upload.php1,419 ▲194.31 ▲0.04109.16 ▼1.2249.32 ▲2.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-adblock-redirect/adblockly.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/simple-adblock-redirect/adblockly-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-adblock-redirect/adblockly-router.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: ads, adblock

simple-adblock-redirect/adblockly.php 92% from 13 tests

This is the main PHP file of "AdBlockly" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-adblock-redirect.php" instead of "adblockly.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected94 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3273493
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin