99% ads-txt-admin

Code Review | Ads.txt Admin

WordPress plugin Ads.txt Admin scored 99% from 54 tests.

About plugin

  • Plugin page: ads-txt-admin
  • Plugin version: 1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.3
  • WordPress version: 5.9.2
  • First release: Feb 9, 2018
  • Latest release: Feb 20, 2019
  • Number of updates: 14
  • Update frequency: every 26.9 days
  • Top authors: dmartuszewskium (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 11,408 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼292.47ms] Passed 4 tests

An overview of server-side resources used by Ads.txt Admin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0257.55 ▼4.97
Dashboard /wp-admin3.44 ▲0.0340.36 ▲3.52
Posts /wp-admin/edit.php3.66 ▲0.0245.41 ▲2.31
Add New Post /wp-admin/post-new.php6.91 ▼0.07104.66 ▼1,168.79
Media Library /wp-admin/upload.php3.32 ▲0.0230.43 ▲1.57

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Ads.txt Admin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,791 ▲4715.86 ▲0.276.29 ▼0.102.16 ▼0.88
Dashboard /wp-admin2,914 ▲536.27 ▲0.23119.38 ▼15.38174.24 ▲10.50
Posts /wp-admin/edit.php2,715 ▲213.12 ▼0.1176.15 ▲12.60150.29 ▲5.06
Add New Post /wp-admin/post-new.php1,779 ▲11122.21 ▲4.34453.20 ▲49.97222.83 ▲69.77
Media Library /wp-admin/upload.php1,722 ▲275.59 ▼0.02123.90 ▼26.05200.78 ▲13.04

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Tags: Too many tags (31 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

ads-txt-admin/unveil-media-ads-txt.php 85% from 13 tests

Analyzing the main PHP file in "Ads.txt Admin" version 1.3
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("ads-txt-admin.php" instead of "unveil-media-ads-txt.php")

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin1,270 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS11201771
PHP37615375
JavaScript1220124

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.25
Average class complexity7.00
▷ Minimum class complexity4.00
▷ Maximum class complexity10.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods211.11%
▷ Public methods1477.78%
▷ Protected methods422.22%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.18MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/um-ads-txt-avatar.png2.36KB1.03KB▼ 56.19%
img/um-ads-txt.png11.33KB2.92KB▼ 74.23%
img/um-info.png169.53KB44.43KB▼ 73.79%