84% ads-txt

Code Review | Ads.txt Manager

WordPress plugin Ads.txt Manager scored 84% from 54 tests.

About plugin

  • Plugin page: ads-txt
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 5.9.2
  • First release: Dec 18, 2017
  • Latest release: May 12, 2021
  • Number of updates: 11
  • Update frequency: every 113.2 days
  • Top authors: helen (54.55%)10upbot (45.45%)adamsilverstein (18.18%)

Code review

54 tests

User reviews

11 reviews

Install metrics

90,000+ active / 439,842 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼290.19ms] Passed 4 tests

Server-side resources used by Ads.txt Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1752.29 ▼0.11
Dashboard /wp-admin3.56 ▲0.1532.21 ▼4.26
Posts /wp-admin/edit.php3.78 ▲0.1435.43 ▼1.65
Add New Post /wp-admin/post-new.php7.02 ▲0.0696.13 ▼1,152.48
Media Library /wp-admin/upload.php3.44 ▲0.1427.41 ▼2.36
App-ads.txt /wp-admin/options-general.php?page=app-adstxt-settings3.4433.11
Ads.txt /wp-admin/options-general.php?page=adstxt-settings3.4433.99

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 2 new options
New WordPress options
adstxt_post
app_adstxt_post

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ads.txt Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,774 ▲2015.86 ▲0.185.69 ▼0.732.02 ▼0.35
Dashboard /wp-admin2,899 ▲386.18 ▼0.03114.91 ▼17.18154.77 ▼4.91
Posts /wp-admin/edit.php2,698 ▲43.24 ▲0.0267.49 ▲3.85151.59 ▲5.74
Add New Post /wp-admin/post-new.php1,668 ▼2219.50 ▼1.01428.65 ▲15.80157.45 ▼3.60
Media Library /wp-admin/upload.php1,705 ▲75.53 ▼0.01143.26 ▲9.29185.01 ▼5.87
App-ads.txt /wp-admin/options-general.php?page=app-adstxt-settings1,2054.54105.22136.62
Ads.txt /wp-admin/options-general.php?page=adstxt-settings1,2054.51105.40112.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 2 options
    • app_adstxt_post
    • adstxt_post

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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 take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Adstxt\\add_action() in wp-content/plugins/ads-txt/inc/save.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AdsTxt\\add_action() in wp-content/plugins/ads-txt/inc/admin.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Adstxt\\add_action() in wp-content/plugins/ads-txt/inc/post-type.php:70

User-side errors Passed 1 test

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

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
6 plugin tags: publishing, ad manager, adstxt, publishers, advertising...

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

The principal PHP file in "Ads.txt Manager" v. 1.3.0 is loaded by WordPress automatically on each request
137 characters long description:
Create, manage, and validate your Ads.txt from within WordPress, just like any other content asset. Requires PHP 5.3+ and WordPress 4.9+.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin634 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4107197567
JavaScript115364
CSS1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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 images were found in this plugin