84% monetizemore-ads-txt

Code Review | Ads.txt

WordPress plugin Ads.txt scored84%from 54 tests.

About plugin

  • Plugin page: monetizemore-ads-txt
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8.3
  • WordPress version: 6.3.1
  • First release: Jan 9, 2018
  • Latest release: Jun 2, 2018
  • Number of updates: 6
  • Update frequency: every 28.8 days
  • Top authors: drewazarias (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.83ms] Passed 4 tests

A check of server-side resources used by Ads.txt
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.01 ▼3.26
Dashboard /wp-admin3.36 ▲0.0156.73 ▼7.40
Posts /wp-admin/edit.php3.47 ▲0.1256.49 ▲5.48
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.56 ▼5.54
Media Library /wp-admin/upload.php3.26 ▲0.0338.68 ▲0.88

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 61 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Ads.txt
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,984 ▲21314.97 ▲0.602.02 ▲0.0343.92 ▼2.40
Dashboard /wp-admin2,385 ▲1946.64 ▲0.79139.82 ▲32.4042.28 ▼2.37
Posts /wp-admin/edit.php2,292 ▲2033.62 ▲1.6357.24 ▲20.2936.52 ▲1.36
Add New Post /wp-admin/post-new.php1,680 ▲16122.42 ▼0.79651.66 ▼31.8242.97 ▼12.94
Media Library /wp-admin/upload.php1,422 ▲344.37 ▲0.1486.23 ▼33.9546.49 ▼3.77

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
The following issues need your attention
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/monetizemore-ads-txt/modules/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/monetizemore-ads-txt/modules/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/monetizemore-ads-txt/modules/scripts.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/monetizemore-ads-txt/modules/hooks.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
Please take inspiration from this readme.txt

monetizemore-ads-txt/wp-ads-txt.php 92% from 13 tests

"Ads.txt" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("monetizemore-ads-txt.php" instead of "wp-ads-txt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin19,368 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
CSS91,21323912,784
JavaScript61,1138723,598
Sass1319221,158
LESS1319311,149
SVG100504
PHP48268175

PHP code Passed 2 tests

An short overview of 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.36
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%
Functions4
▷ Named functions4100.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
6 PNG files occupy 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/inc/assets/css/glyphicons-halflings-white.png8.57KB9.20KB0.00%
modules/inc/assets/icon-128x128.png15.18KB4.78KB▼ 68.53%
modules/inc/assets/css/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
modules/inc/assets/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
modules/inc/assets/icon-256x256.png49.65KB12.78KB▼ 74.26%