84% ads-txt-lab

Code Review | ads.txt lab

WordPress plugin ads.txt lab scored84%from 54 tests.

About plugin

  • Plugin page: ads-txt-lab
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Oct 28, 2017
  • Latest release: Oct 28, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: adstxtlab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,391 total downloads


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.01MB] [CPU: ▼7.67ms] Passed 4 tests

Server-side resources used by ads.txt lab
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.42 ▲4.35
Dashboard /wp-admin3.31 ▼0.0344.70 ▼15.92
Posts /wp-admin/edit.php3.36 ▲0.0046.45 ▼6.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.03 ▼9.34
Media Library /wp-admin/upload.php3.23 ▲0.0035.94 ▲0.83
ads.txt lab /wp-admin/options-general.php?page=ads_txt_lab_admin3.2430.91

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for ads.txt lab
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.33 ▼1.051.61 ▲0.0339.76 ▼0.46
Dashboard /wp-admin2,210 ▲225.84 ▲0.9198.54 ▼9.5639.30 ▼4.01
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0137.07 ▼4.4733.92 ▼1.82
Add New Post /wp-admin/post-new.php1,517 ▼1117.43 ▼0.91637.61 ▼1.1553.16 ▼2.36
Media Library /wp-admin/upload.php1,395 ▲74.21 ▼0.0195.50 ▲0.6739.86 ▼3.84
ads.txt lab /wp-admin/options-general.php?page=ads_txt_lab_admin7782.0322.9223.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/ads-txt-lab/views/admin.php
    • > /wp-content/plugins/ads-txt-lab/adstxtlab.php

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: iab, banner, advertising, adstxt

ads-txt-lab/adstxtlab.php 85% from 13 tests

The principal PHP file in "ads.txt lab" v. 1.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 325 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ads-txt-lab.php" instead of "adstxtlab.php")

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
Success! There were no dangerous files found in this plugin161 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
▷ Named functions5100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected