56% adfoxly

Code Review | AdFoxly - Ad Manager, AdSense Ads & Ads.txt

WordPress plugin AdFoxly - Ad Manager, AdSense Ads & Ads.txt scored 56% from 54 tests.

About plugin

  • Plugin page: adfoxly
  • Plugin version: 1.7.9
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 5.9.2
  • First release: Apr 22, 2019
  • Latest release: Sep 10, 2021
  • Number of updates: 70
  • Update frequency: every 12.5 days
  • Top authors: rafalosinski (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

900+ active / 8,048 total downloads


Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲5.32MB] [CPU: ▼265.09ms] 75% from 4 tests

An overview of server-side resources used by AdFoxly - Ad Manager, AdSense Ads & Ads.txt
Please take the time to fix the following items
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.32MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.91 ▲5.39103.19 ▲45.13
Dashboard /wp-admin8.74 ▲5.3368.06 ▲30.30
Posts /wp-admin/edit.php8.98 ▲5.3470.43 ▲30.32
Add New Post /wp-admin/post-new.php12.21 ▲5.23128.19 ▼1,149.46
Media Library /wp-admin/upload.php8.68 ▲5.3854.79 ▲28.47
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius8.8758.35

Server storage [IO: ▲29.23MB] [DB: ▲0.01MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • Total filesystem usage should be limited to 25MB (currently using 29.23MB)
Filesystem: 1,750 new files
Database: 2 new tables, 6 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for AdFoxly - Ad Manager, AdSense Ads & Ads.txt
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,969 ▲21516.19 ▼0.0111.07 ▲4.382.07 ▼1.25
Dashboard /wp-admin2,960 ▲996.35 ▼0.14119.48 ▼16.62241.47 ▲74.86
Posts /wp-admin/edit.php2,749 ▲923.43 ▼0.0064.97 ▲1.21151.74 ▲11.11
Add New Post /wp-admin/post-new.php1,721 ▲6020.80 ▲1.77452.86 ▲47.78199.20 ▲29.53
Media Library /wp-admin/upload.php1,756 ▲615.76 ▲0.02126.56 ▼6.67225.98 ▲33.98
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius1,4832.7154.92117.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/adfoxly/includes/freemius/includes/class-freemius.php+8552
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_adfoxly_statistics_clicks
    • wp_adfoxly_statistics_views
  • The uninstall procedure has failed, leaving 6 options in the database
    • fs_accounts
    • fs_debug_mode
    • fs_active_plugins
    • fs_gdpr
    • widget_adfoxly
    • adfoxly_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/adfoxly/includes/freemius/templates/ajax-loader.php
    • > /wp-content/plugins/adfoxly/includes/mobiledetect/export/exportToJSON.php
  • 288× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/adfoxly/vendor/twig/twig/src/Node/Expression/AbstractExpression.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/adfoxly/vendor/composer/installers/src/Composer/Installers/AglInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/adfoxly/vendor/twig/twig/src/Extension/CoreExtension.php:75
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/adfoxly/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/adfoxly/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/adfoxly/vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Node/CacheNode.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Timber\\Term' not found in wp-content/plugins/adfoxly/vendor/timber/timber/lib/Menu.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/adfoxly/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/adfoxly/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/adfoxly/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php:4

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #6 is missing in adfoxly/assets to your readme.txt
Please take inspiration from this readme.txt

adfoxly/adfoxly.php 92% from 13 tests

The primary PHP file in "AdFoxly - Ad Manager, AdSense Ads & Ads.txt" version 1.7.9 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 174 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected277,954 lines of code in 1,622 files:
LanguageFilesBlank linesComment linesLines of code
Bourne Shell55722310
PO File15969145

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,907)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 127)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity13.94
▷ Minimum class complexity1.00
▷ Maximum class complexity2,907.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity127.00
Code structure
▷ Abstract classes162.68%
▷ Concrete classes58297.32%
▷ Final classes518.76%
▷ Static methods44915.35%
▷ Public methods2,31078.95%
▷ Protected methods1976.73%
▷ Private methods41914.32%
▷ Named functions21280.92%
▷ Anonymous functions5019.08%
▷ Global constants10452.26%
▷ Class constants9547.74%
▷ Public constants95100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
29 PNG files occupy 0.49MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/vendors/timepicki/images/top_arr.png1.10KB0.27KB▼ 75.56%
assets/vendors/timepicki/images/arrow.png1.35KB0.43KB▼ 68.07%
assets/vendors/stisla/dist/assets/modules/jquery-ui/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%