94% adplugg

Code Review | AdPlugg WordPress Ad Plugin

WordPress plugin AdPlugg WordPress Ad Plugin scored 94% from 54 tests.

About plugin

  • Plugin page: adplugg
  • Plugin version: 1.9.60
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.9.2
  • WordPress version: 5.9.2
  • First release: Jan 9, 2014
  • Latest release: Mar 21, 2022
  • Number of updates: 598
  • Update frequency: every 5.0 days
  • Top authors: adplugg (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

800+ active / 153,412 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼291.88ms] Passed 4 tests

Server-side resources used by AdPlugg WordPress Ad Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2055.12 ▼0.65
Dashboard /wp-admin3.72 ▲0.3134.71 ▲2.14
Posts /wp-admin/edit.php3.94 ▲0.3042.26 ▲4.93
Add New Post /wp-admin/post-new.php7.24 ▲0.2794.29 ▼1,171.81
Media Library /wp-admin/upload.php3.66 ▲0.3727.53 ▲2.80
AMP /wp-admin/admin.php?page=adplugg_amp_settings3.6425.34
General /wp-admin/admin.php?page=adplugg3.6428.14
Facebook /wp-admin/admin.php?page=adplugg_facebook_settings3.6426.04

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 77 new files
Database: no new tables, 2 new options
New WordPress options
adplugg_options
widget_adplugg

Browser metrics Passed 4 tests

AdPlugg WordPress Ad Plugin: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,835 ▲9315.87 ▼0.145.92 ▲0.032.33 ▲0.30
Dashboard /wp-admin2,965 ▲1046.17 ▼0.03116.96 ▼24.88160.01 ▼9.10
Posts /wp-admin/edit.php2,762 ▲713.26 ▲0.0368.60 ▲3.17142.04 ▼1.21
Add New Post /wp-admin/post-new.php1,719 ▲5820.07 ▲3.56382.40 ▼49.74160.72 ▲4.02
Media Library /wp-admin/upload.php1,768 ▲705.58 ▲0.06138.67 ▼15.94188.83 ▼5.60
AMP /wp-admin/admin.php?page=adplugg_amp_settings1,4162.8858.21139.72
General /wp-admin/admin.php?page=adplugg2,4739.27296.00165.90
Facebook /wp-admin/admin.php?page=adplugg_facebook_settings1,3362.7557.43132.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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 fix the following
  • 63× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ADPLUGG_INCLUDES - assumed 'ADPLUGG_INCLUDES' (this will throw an Error in a future version of PHP) in wp-content/plugins/adplugg/tests/includes/frontend/test-class-adplugg-facebook-instant-articles.php on line 3
    • > PHP Warning
      require_once(ADPLUGG_INCLUDESadmin/notices/class-adplugg-notice.php): failed to open stream: No such file or directory in wp-content/plugins/adplugg/tests/includes/admin/test-class-adplugg-admin.php on line 3
    • > PHP Warning
      Use of undefined constant ADPLUGG_INCLUDES - assumed 'ADPLUGG_INCLUDES' (this will throw an Error in a future version of PHP) in wp-content/plugins/adplugg/tests/includes/admin/notices/test-class-adplugg-notice.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/adplugg/tests/includes/test-class-adplugg-options.php:10
    • > PHP Warning
      require_once(ADPLUGG_INCLUDESadmin/pages/class-adplugg-facebook-options-page.php): failed to open stream: No such file or directory in wp-content/plugins/adplugg/tests/includes/admin/pages/test-class-adplugg-facebook-options-page.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ADPLUGG_INCLUDESadmin/notices/class-adplugg-notice.php' (include_path='.:/usr/share/php') in wp-content/plugins/adplugg/tests/includes/admin/notices/test-class-adplugg-notice-controller.php on line 3
    • > PHP Warning
      Use of undefined constant ADPLUGG_INCLUDES - assumed 'ADPLUGG_INCLUDES' (this will throw an Error in a future version of PHP) in wp-content/plugins/adplugg/tests/includes/admin/help/test-class-adplugg-widgets-page-help.php on line 3
    • > PHP Warning
      require_once(ADPLUGG_INCLUDESadmin/notices/class-adplugg-notice.php): failed to open stream: No such file or directory in wp-content/plugins/adplugg/tests/includes/admin/notices/test-class-adplugg-notice.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ADPLUGG_INCLUDESfrontend/class-adplugg-feed.php' (include_path='.:/usr/share/php') in wp-content/plugins/adplugg/tests/includes/frontend/test-class-adplugg-feed.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ADPLUGG_INCLUDESadmin/pages/class-adplugg-amp-options-page.php' (include_path='.:/usr/share/php') in wp-content/plugins/adplugg/tests/includes/admin/pages/test-class-adplugg-amp-options-page.php on line 3

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: ad server, ads, advertising, ad manager, adsense...

adplugg/adplugg.php 92% from 13 tests

The main file in "AdPlugg WordPress Ad Plugin" v. 1.9.60 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 665 characters long)

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 plugin4,107 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
PHP561,1682,4943,718
Bourne Shell121799
CSS2222786
JavaScript4136671
XML26461
JSON10038
Markdown18022
SVG10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.59
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes51
▷ Abstract classes11.96%
▷ Concrete classes5098.04%
▷ Final classes00.00%
Methods268
▷ Static methods3513.06%
▷ Public methods26498.51%
▷ Protected methods00.00%
▷ Private methods41.49%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants1694.12%
▷ Class constants15.88%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin