84% meks-easy-ads-widget

Code Review | Meks Easy Ads Widget

WordPress plugin Meks Easy Ads Widget scored 84% from 54 tests.

About plugin

  • Plugin page: meks-easy-ads-widget
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 14, 2014
  • Latest release: Sep 11, 2023
  • Number of updates: 56
  • Update frequency: every 63.0 days
  • Top authors: mekshq (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

20,000+ active / 421,779 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▲0.31ms] Passed 4 tests

A check of server-side resources used by Meks Easy Ads Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.22 ▲2.69
Dashboard /wp-admin3.43 ▲0.1349.72 ▲2.42
Posts /wp-admin/edit.php3.54 ▲0.1949.53 ▲1.30
Add New Post /wp-admin/post-new.php6.00 ▲0.1293.88 ▼3.96
Media Library /wp-admin/upload.php3.33 ▲0.1033.16 ▲1.48

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_mks_ads_widget
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_mks_widget_hidden
can_compress_scripts

Browser metrics Passed 4 tests

Meks Easy Ads Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲20214.74 ▲0.371.72 ▲0.1640.22 ▲0.19
Dashboard /wp-admin2,341 ▲1526.57 ▲1.66133.12 ▲13.2242.29 ▼2.47
Posts /wp-admin/edit.php2,247 ▲1553.50 ▲1.5168.01 ▲27.4335.27 ▲1.04
Add New Post /wp-admin/post-new.php1,523 ▼1023.62 ▲0.77599.47 ▼17.9833.58 ▼21.40
Media Library /wp-admin/upload.php1,389 ▲14.13 ▼0.0993.83 ▼0.3342.15 ▲1.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_mks_widget_hidden
    • can_compress_scripts
    • widget_mks_ads_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/meks-easy-ads-widget/inc/template-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/meks-easy-ads-widget/meks-easy-ads-widget.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/meks-easy-ads-widget/inc/class-ads-blocker-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/meks-easy-ads-widget/inc/class-ads-widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: widget, ad, marketing, affiliate, advertisement...

meks-easy-ads-widget/meks-easy-ads-widget.php Passed 13 tests

The principal PHP file in "Meks Easy Ads Widget" v. 2.0.8 is loaded by WordPress automatically on each request
112 characters long description:
Display unlimited number of ads inside your WordPress widget. Specify custom ads size, randomize, rotate, enjoy!

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
Everything looks great! No dangerous files found in this plugin586 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP410163329
CSS2102104
JavaScript125984
PO File1272769

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity22.00
▷ Minimum class complexity7.00
▷ Maximum class complexity37.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected