84% mk-adblock

Code Review | MK Adblock

WordPress plugin MK Adblock scored 84% from 54 tests.

About plugin

  • Plugin page: mk-adblock
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 30, 2018
  • Latest release: Apr 30, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: truser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 597 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by MK Adblock
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.01 ▼3.09
Dashboard /wp-admin3.31 ▲0.0147.05 ▼2.84
Posts /wp-admin/edit.php3.36 ▲0.0148.82 ▲0.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.66 ▼7.17
Media Library /wp-admin/upload.php3.24 ▲0.0134.75 ▼0.33

Server storage [IO: ▲0.02MB] [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, 8 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
mk_adblock_description
mk_adblock_title
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by MK Adblock
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲17013.74 ▼0.4610.66 ▲8.9848.50 ▲1.20
Dashboard /wp-admin2,224 ▲364.87 ▼1.03109.32 ▲5.9840.35 ▼0.41
Posts /wp-admin/edit.php2,107 ▲181.99 ▼0.0240.79 ▼0.8334.29 ▼0.04
Add New Post /wp-admin/post-new.php1,543 ▲1423.23 ▲4.79590.50 ▼51.6253.50 ▲4.63
Media Library /wp-admin/upload.php1,406 ▲214.23 ▲0.0597.71 ▼3.1040.55 ▼6.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • mk_adblock_title
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • mk_adblock_description
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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 server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mk-adblock/mk-adblock.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

mk-adblock/mk-adblock.php Passed 13 tests

The main PHP file in "MK Adblock" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
79 characters long description:
If your visitors uses Adblock, hide your elements, videos and show alert block!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected369 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1266219
PHP1109125
CSS20125

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin