10% adblock-invite

Code Review | Adblock invite (Yes adblock)

WordPress plugin Adblock invite (Yes adblock) scored10%from 54 tests.

About plugin

  • Plugin page: adblock-invite
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Jan 13, 2013
  • Latest release: Apr 27, 2015
  • Number of updates: 5
  • Update frequency: every 166.8 days
  • Top authors: kepon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /28,802 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/adblock-invite/widget.php+54
    Methods with the same name as their class will not be constructors in a future version of PHP; adblockInviteWidget has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼57.83ms] Passed 4 tests

Analyzing server-side resources used by Adblock invite (Yes adblock)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.32 ▼34.39
Dashboard /wp-admin2.09 ▼1.225.51 ▼51.12
Posts /wp-admin/edit.php2.09 ▼1.275.99 ▼43.03
Add New Post /wp-admin/post-new.php2.09 ▼3.804.87 ▼101.50
Media Library /wp-admin/upload.php2.09 ▼1.1411.12 ▼35.65

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_adblock_invite_widget

Browser metrics Passed 4 tests

A check of browser resources used by Adblock invite (Yes adblock)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7314.41 ▲0.342.59 ▲0.7943.82 ▼2.96
Dashboard /wp-admin2,203 ▲155.85 ▲0.97118.83 ▲11.4241.56 ▼6.89
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0339.69 ▲1.7935.05 ▼0.91
Add New Post /wp-admin/post-new.php1,532 ▼123.21 ▼0.01665.46 ▲0.9960.17 ▼0.62
Media Library /wp-admin/upload.php1,388 ▼34.23 ▼0.02121.52 ▲17.8444.37 ▼0.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/adblock-invite/widget.php+54
    Methods with the same name as their class will not be constructors in a future version of PHP; adblockInviteWidget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_adblock_invite_widget
    • widget_recent-posts
    • 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)
The smoke test was a success, however most plugin functionality was not tested

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 fix 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/adblock-invite/widget.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: adblock, widget, blocked, ads

adblock-invite/widget.php 92% from 13 tests

The entry point to "Adblock invite (Yes adblock)" version 0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("adblock-invite.php" instead of "widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin73 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1181669
CSS1103
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png18.67KB7.80KB▼ 58.19%
screenshot-2.png20.40KB8.79KB▼ 56.90%