84% adstxt

Code Review | adstxt Plugin

WordPress plugin adstxt Plugin scored84%from 54 tests.

About plugin

  • Plugin page: adstxt
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 4, 2021
  • Latest release: Sep 15, 2023
  • Number of updates: 7
  • Update frequency: every 110.3 days
  • Top authors: vbondarenko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /773 total downloads

Benchmarks

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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.35ms] Passed 4 tests

A check of server-side resources used by adstxt Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.09 ▲3.31
Dashboard /wp-admin3.32 ▼0.0350.15 ▼14.28
Posts /wp-admin/edit.php3.37 ▲0.0149.03 ▲0.38
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.44 ▼16.31
Media Library /wp-admin/upload.php3.24 ▲0.0138.76 ▼3.20

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for adstxt Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.47 ▲0.102.11 ▲0.3349.85 ▲8.45
Dashboard /wp-admin2,213 ▲225.85 ▲0.87110.70 ▲4.7643.21 ▲1.80
Posts /wp-admin/edit.php2,108 ▲192.01 ▼0.0039.12 ▲3.7139.53 ▲3.27
Add New Post /wp-admin/post-new.php1,546 ▲19223.25 ▲5.01708.95 ▲9.0759.97 ▲16.78
Media Library /wp-admin/upload.php1,398 ▲74.22 ▲0.05142.97 ▲39.4749.47 ▲1.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/adstxt/adstxt.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Requires php: The plugin version is formatted incorrectly
You can look at the official readme.txt

adstxt/adstxt.php Passed 13 tests

"adstxt Plugin" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
74 characters long description:
Manage your ads.txt from within Wordpress and save as file to uploads dir.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected49 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2131439
Markdown14010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin