10% adblock-invite

Code Review | Adblock invite (Yes adblock)

WordPress plugin Adblock invite (Yes adblock) scored 10% 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: 5.9.2
  • 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 / 27,420 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > 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: ▼2.49MB] [CPU: ▼346.27ms] Passed 4 tests

An overview of server-side resources used by Adblock invite (Yes adblock)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.88 ▼1.644.38 ▼44.92
Dashboard /wp-admin1.89 ▼1.513.52 ▼29.78
Posts /wp-admin/edit.php1.90 ▼1.744.09 ▼34.16
Add New Post /wp-admin/post-new.php1.89 ▼5.074.00 ▼1,276.21
Media Library /wp-admin/upload.php1.89 ▼1.413.55 ▼25.33

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
widget_adblock_invite_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Adblock invite (Yes adblock)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,773 ▲1916.18 ▲0.186.46 ▼0.592.75 ▲0.12
Dashboard /wp-admin2,892 ▲386.16 ▼0.11118.59 ▼14.46160.02 ▲1.33
Posts /wp-admin/edit.php2,685 ▼33.23 ▼0.0262.14 ▲0.17142.25 ▲3.36
Add New Post /wp-admin/post-new.php1,661 ▼016.70 ▲0.54392.76 ▼20.57159.59 ▲0.35
Media Library /wp-admin/upload.php1,701 ▲35.53 ▲0.04142.82 ▲3.19187.61 ▼2.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • 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
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_adblock_invite_widget

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: adblock, ads, widget, blocked

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

The main PHP file in "Adblock invite (Yes adblock)" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
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

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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%