68% app-ads-txt

Code Review | Ads.txt & App-ads.txt Manager for WordPress

WordPress plugin Ads.txt & App-ads.txt Manager for WordPress scored68%from 54 tests.

About plugin

  • Plugin page: app-ads-txt
  • Plugin version: 1.1.7.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 27, 2019
  • Latest release: Aug 24, 2023
  • Number of updates: 37
  • Update frequency: every 39.4 days
  • Top authors: pagup (97.3%)The-Rock (5.41%)

Code review

54 tests

User reviews

25 reviews

Install metrics

3,000+ active /41,865 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲5.02MB] [CPU: ▲24.85ms] 75% from 4 tests

A check of server-side resources used by Ads.txt & App-ads.txt Manager for WordPress
Please have a look at the following items
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.02MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.90 ▲5.4460.61 ▲23.87
Dashboard /wp-admin8.92 ▲5.6277.23 ▲29.42
Posts /wp-admin/edit.php8.92 ▲5.5784.69 ▲36.58
Add New Post /wp-admin/post-new.php9.33 ▲3.45109.31 ▲14.13
Media Library /wp-admin/upload.php8.92 ▲5.7067.40 ▲31.97
Ads.txt & App-Ads.txt /wp-admin/options-general.php?page=adtm8.9257.01
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9256.25

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 304 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
fs_debug_mode
fs_active_plugins
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
fs_accounts

Browser metrics Passed 4 tests

Checking browser requirements for Ads.txt & App-ads.txt Manager for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲11413.69 ▼1.081.57 ▼0.1029.63 ▼15.28
Dashboard /wp-admin2,255 ▲664.87 ▼0.06110.45 ▲0.7342.42 ▼2.61
Posts /wp-admin/edit.php2,138 ▲462.08 ▲0.0641.40 ▲1.7038.92 ▲2.88
Add New Post /wp-admin/post-new.php1,544 ▲1123.18 ▲0.02624.47 ▼67.3561.11 ▲4.80
Media Library /wp-admin/upload.php1,437 ▲524.32 ▲0.1595.87 ▼7.3844.19 ▼1.87
Ads.txt & App-Ads.txt /wp-admin/options-general.php?page=adtm1,4992.2531.3663.58
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0932.2723.5927.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/app-ads-txt/app-ads-txt.php+138
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • fs_debug_mode
    • fs_accounts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • fs_active_plugins
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/app-ads-txt/inc/youtube-trans.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/app-ads-txt/inc/sidebar.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/app-ads-txt/inc/recommendations.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/app-ads-txt/inc/notices.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/app-ads-txt/inc/seo-recommendations.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/app-ads-txt/admin-ui-inc/app-ads-txt-inc.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/app-ads-txt/inc/main-view.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/app-ads-txt/inc/faq.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/app-ads-txt/admin-ui-inc/ads-txt-inc.php:5

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 errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: A description for screenshot #3 is missing in app-ads-txt/assets to your readme.txt
Please take inspiration from this readme.txt

app-ads-txt/app-ads-txt.php Passed 13 tests

The primary PHP file in "Ads.txt & App-ads.txt Manager for WordPress" version 1.1.7.1 is used by WordPress to initiate all plugin functionality
132 characters long description:
App-ads.txt & Ads.txt manager allows you to create, manage & publish your app-ads.txt & ads.txt files from your WordPress dashboard.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected64,443 lines of code in 211 files:
LanguageFilesBlank linesComment linesLines of code
PHP1318,27017,40134,715
PO File318,2729,76924,842
Sass28399772,515
JavaScript74122561,719
CSS144113652

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity88.12
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,273
▷ Static methods20115.79%
▷ Public methods88469.44%
▷ Protected methods171.34%
▷ Private methods37229.22%
Functions107
▷ Named functions107100.00%
▷ Anonymous functions00.00%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.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
18 PNG files occupy 0.29MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/assets/img/vidseo.png9.16KB5.26KB▼ 42.58%
vendor/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/imgs/permalinks.png73.02KB35.94KB▼ 50.79%
assets/imgs/p09.png6.65KB3.68KB▼ 44.60%
vendor/freemius/assets/img/bulk-html-image-title-attribute.png9.16KB5.26KB▼ 42.58%