83% wphotline-ads-txt

Code Review | ads.txt for WordPress

WordPress plugin ads.txt for WordPress scored83%from 54 tests.

About plugin

  • Plugin page: wphotline-ads-txt
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 16, 2017
  • Latest release: Nov 17, 2017
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: dpoakaspine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,491 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.87ms] Passed 4 tests

This is a short check of server-side resources used by ads.txt for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.39 ▼3.44
Dashboard /wp-admin3.32 ▲0.0248.89 ▼3.31
Posts /wp-admin/edit.php3.38 ▲0.0147.21 ▼9.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.71 ▼14.90
Media Library /wp-admin/upload.php3.25 ▲0.0137.02 ▼1.35
ads.txt /wp-admin/options-general.php?page=ads.txt3.1934.29

Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/wphotline-ads-txt/" and "wp-content/uploads/"
    • (new file) ads.txt
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

ads.txt for WordPress: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.121.75 ▼0.1838.65 ▼2.18
Dashboard /wp-admin2,210 ▲224.87 ▼1.19100.55 ▼9.2339.05 ▼1.79
Posts /wp-admin/edit.php2,093 ▲12.02 ▲0.0034.89 ▼6.3132.71 ▼3.79
Add New Post /wp-admin/post-new.php1,545 ▲1218.11 ▼5.08626.06 ▼49.4755.00 ▲3.01
Media Library /wp-admin/upload.php1,395 ▲104.22 ▲0.03100.18 ▼0.9445.98 ▲1.36
ads.txt /wp-admin/options-general.php?page=ads.txt8462.0223.4627.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ads.txt
    • > Notice in wp-content/plugins/wphotline-ads-txt/index.php+66
    Trying to access array offset on value of type bool

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Requires php: Invalid version format
  • Requires at least: Invalid version format
  • Contributors: The plugin contributors field is missing
You can take inspiration from this readme.txt

wphotline-ads-txt/index.php 92% from 13 tests

The entry point to "ads.txt for WordPress" version 0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wphotline-ads-txt.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin62 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1272562

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
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
Namespaces0
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin