93% authorized-sellers-manager

Code Review | Ads.txt Publisher

WordPress plugin Ads.txt Publisher scored 93% from 54 tests.

About plugin

  • Plugin page: authorized-seller...
  • Plugin version: 1.0.16
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 5.8.1
  • First release: Apr 1, 2018
  • Latest release: Apr 11, 2018
  • Number of updates: 7
  • Update frequency: every 1.7 days
  • Top authors: alexandrucbrightcom (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

900+ active / 4,141 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.09MB] [CPU: ▼146.64ms] Passed 4 tests

A check of server-side resources used by Ads.txt Publisher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1837.78 ▲15.46
Dashboard /wp-admin3.13 ▲0.0838.98 ▼12.08
Posts /wp-admin/edit.php3.24 ▲0.1449.27 ▲0.39
Add New Post /wp-admin/post-new.php5.49 ▲0.0695.00 ▼584.29
Media Library /wp-admin/upload.php3.07 ▲0.0742.73 ▲9.44

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Ads.txt Publisher
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,715 ▲11916.03 ▲0.5610.26 ▲0.7147.04 ▼1.89
Dashboard /wp-admin3,002 ▲656.26 ▲0.30163.43 ▲14.50110.04 ▼5.30
Posts /wp-admin/edit.php2,775 ▲362.73 ▲0.0167.18 ▼5.0390.28 ▼2.31
Add New Post /wp-admin/post-new.php1,710 ▲2718.33 ▼0.54421.27 ▲3.40140.90 ▲33.99
Media Library /wp-admin/upload.php1,843 ▲365.08 ▲0.05153.30 ▼9.16109.87 ▼0.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/authorized-sellers-manager/admin/partials/ads-txt-publisher-new-user-email.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/authorized-sellers-manager/admin/partials/ads-txt-publisher-admin-display.php:15

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: publisher, adstxt, ads

authorized-sellers-manager/ads-txt-publisher.php 77% from 13 tests

The primary PHP file in "Ads.txt Publisher" version 1.0.16 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 164 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("authorized-sellers-manager.php" instead of "ads-txt-publisher.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
Good job! No executable or dangerous file extensions detected1,372 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript210546512
PHP11144421501
Sass1461200
CSS180154
SVG1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods30
▷ Static methods310.00%
▷ Public methods2686.67%
▷ Protected methods00.00%
▷ Private methods413.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.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 were not PNG files found in your plugin