84% adplugg

Code Review | AdPlugg WordPress Ad Plugin

WordPress plugin AdPlugg WordPress Ad Plugin scored84%from 54 tests.

About plugin

  • Plugin page: adplugg
  • Plugin version: 1.12.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 9, 2014
  • Latest release: Nov 9, 2023
  • Number of updates: 635
  • Update frequency: every 5.7 days
  • Top authors: adplugg (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

600+ active /166,927 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▲1.32ms] Passed 4 tests

An overview of server-side resources used by AdPlugg WordPress Ad Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1638.56 ▼1.55
Dashboard /wp-admin3.68 ▲0.3849.63 ▼2.15
Posts /wp-admin/edit.php3.73 ▲0.3850.29 ▲0.30
Add New Post /wp-admin/post-new.php6.20 ▲0.3196.45 ▲8.67
Media Library /wp-admin/upload.php3.54 ▲0.3138.20 ▲9.50
Facebook /wp-admin/admin.php?page=adplugg_facebook_settings3.5134.83
General /wp-admin/admin.php?page=adplugg3.5134.43
AMP /wp-admin/admin.php?page=adplugg_amp_settings3.5134.08

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 85 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
adplugg_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_adplugg

Browser metrics Passed 4 tests

A check of browser resources used by AdPlugg WordPress Ad Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲8414.33 ▲0.071.64 ▼0.0238.19 ▼3.57
Dashboard /wp-admin2,251 ▲715.60 ▼0.0788.44 ▲0.0541.37 ▼2.18
Posts /wp-admin/edit.php2,156 ▲562.01 ▲0.0142.00 ▲0.9437.90 ▼4.02
Add New Post /wp-admin/post-new.php6,414 ▲4,88827.57 ▲3.88887.40 ▲213.6237.57 ▼19.74
Media Library /wp-admin/upload.php1,456 ▲564.21 ▼0.0197.87 ▼7.1342.67 ▲1.85
Facebook /wp-admin/admin.php?page=adplugg_facebook_settings1,0301.9326.6329.63
General /wp-admin/admin.php?page=adplugg2,0579.85204.9441.68
AMP /wp-admin/admin.php?page=adplugg_amp_settings1,0701.7927.3630.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 65× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/adplugg/tests/includes/integrations/mailpoet/test-class-adplugg-mailpoet.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/adplugg/tests/includes/core/test-class-adplugg-ad-tag.php:10
    • > 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-facebook-instant-articles.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/test-class-privacy.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ADPLUGG_INCLUDESadmin/help/class-adplugg-widgets-page-help.php' (include_path='.:/usr/share/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/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 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
      require_once(ADPLUGG_INCLUDESadmin/help/class-adplugg-widgets-page-help.php): failed to open stream: No such file or directory in wp-content/plugins/adplugg/tests/includes/admin/help/test-class-adplugg-widgets-page-help.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/test-class-adplugg-admin.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ADPLUGG_INCLUDESwidgets/class-adplugg-widget.php' (include_path='.:/usr/share/php') in wp-content/plugins/adplugg/tests/includes/widgets/test-class-adplugg-widget.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: ads, ad server, ad rotator, banners, adsense...

adplugg/adplugg.php 92% from 13 tests

"AdPlugg WordPress Ad Plugin" version 1.12.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (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
No dangerous file extensions were detected4,312 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PHP611,2102,5933,830
JavaScript51975134
Bourne Shell121799
CSS3223392
JSON20062
XML26461
Markdown18022
SVG10012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.45
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes55
▷ Abstract classes11.82%
▷ Concrete classes5498.18%
▷ Final classes00.00%
Methods277
▷ Static methods3713.36%
▷ Public methods27398.56%
▷ Protected methods00.00%
▷ Private methods41.44%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants1894.74%
▷ Class constants15.26%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected