84% ads-txt

Code Review | Ads.txt Manager

WordPress plugin Ads.txt Manager scored84%from 54 tests.

About plugin

  • Plugin page: ads-txt
  • Plugin version: 1.4.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Dec 18, 2017
  • Latest release: Sep 20, 2023
  • Number of updates: 18
  • Update frequency: every 117.0 days
  • Top authors: 10up (44.44%)helen (33.33%)10upbot (27.78%)adamsilverstein (11.11%)

Code review

54 tests

User reviews

13 reviews

Install metrics

100,000+ active /1,014,434 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.66ms] Passed 4 tests

Analyzing server-side resources used by Ads.txt Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.62 ▲2.69
Dashboard /wp-admin3.35 ▲0.0151.39 ▼6.21
Posts /wp-admin/edit.php3.40 ▲0.0547.42 ▼2.51
Add New Post /wp-admin/post-new.php5.93 ▲0.0599.60 ▼0.45
Media Library /wp-admin/upload.php3.27 ▲0.0536.94 ▲2.55
App-ads.txt /wp-admin/options-general.php?page=app-adstxt-settings3.2940.84
Ads.txt /wp-admin/options-general.php?page=adstxt-settings3.2938.87

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ads.txt Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.20 ▼1.031.70 ▲0.0139.40 ▼1.56
Dashboard /wp-admin2,211 ▲234.85 ▼0.08109.22 ▲0.9041.56 ▼1.52
Posts /wp-admin/edit.php2,097 ▲52.01 ▼0.0139.06 ▼1.7635.55 ▲0.74
Add New Post /wp-admin/post-new.php1,539 ▲1123.45 ▲5.07643.89 ▲31.5962.00 ▲11.70
Media Library /wp-admin/upload.php1,399 ▲84.30 ▲0.08110.49 ▲7.3845.66 ▼0.92
App-ads.txt /wp-admin/options-general.php?page=app-adstxt-settings1,0003.5684.7544.02
Ads.txt /wp-admin/options-general.php?page=adstxt-settings9973.4971.0434.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • adstxt_post
    • app_adstxt_post
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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

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

Analyzing the main PHP file in "Ads.txt Manager" version 1.4.3
137 characters long description:
Create, manage, and validate your Ads.txt from within WordPress, just like any other content asset. Requires PHP 7.4+ and WordPress 5.7+.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected724 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4131221629
JavaScript121592
CSS1003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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 files were detected