89% the-publisher-desk-ads-txt

Code Review | The Publisher Desk ads.txt

WordPress plugin The Publisher Desk ads.txt scored89%from 54 tests.

About plugin

  • Plugin page: the-publisher-des...
  • Plugin version: 1.5.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0.1
  • WordPress version: 6.3.1
  • First release: May 26, 2019
  • Latest release: Aug 18, 2022
  • Number of updates: 31
  • Update frequency: every 38.1 days
  • Top authors: thepublisherdesk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,070 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.75ms] Passed 4 tests

Analyzing server-side resources used by The Publisher Desk ads.txt
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.59 ▲2.58
Dashboard /wp-admin3.37 ▲0.0644.70 ▼3.08
Posts /wp-admin/edit.php3.48 ▲0.1249.36 ▲0.83
Add New Post /wp-admin/post-new.php5.95 ▲0.0678.39 ▼23.51
Media Library /wp-admin/upload.php3.29 ▲0.0635.37 ▼1.22

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

Analyzing filesystem and database footprints of this plugin
These are issues you should consider
  • You have illegally modified 1 file (22.31KB) outside of "wp-content/plugins/the-publisher-desk-ads-txt/" and "wp-content/uploads/"
    • (new file) ads.txt
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
tpdat_plugin_version
widget_recent-posts
widget_recent-comments
tpd_adstxt
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for The Publisher Desk ads.txt
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.44 ▲0.191.76 ▲0.0444.23 ▲2.13
Dashboard /wp-admin2,219 ▲285.88 ▲0.84112.26 ▲12.5142.19 ▼0.32
Posts /wp-admin/edit.php2,108 ▲192.05 ▼0.0240.28 ▼3.6334.68 ▼1.74
Add New Post /wp-admin/post-new.php1,547 ▲1623.18 ▲0.06641.64 ▲16.8753.57 ▼6.69
Media Library /wp-admin/upload.php1,401 ▲134.19 ▲0.0594.96 ▼1.4440.45 ▼1.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • tpdat_plugin_version
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 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 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
No output text or server-side errors detected 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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: monetization, ads, adstxt, advertising, publishing

the-publisher-desk-ads-txt/tpd-adstxt-plugin.php 92% from 13 tests

This is the main PHP file of "The Publisher Desk ads.txt" version 1.5.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("the-publisher-desk-ads-txt.php" instead of "tpd-adstxt-plugin.php")

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

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity23.67
▷ Minimum class complexity12.00
▷ Maximum class complexity45.00
Average method complexity5.86
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions2790.00%
▷ Anonymous functions310.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin