83% nx-adstxt

Code Review | MAIRDUMONT NETLETIX ads.txt Agent

WordPress plugin MAIRDUMONT NETLETIX ads.txt Agent scored 83% from 54 tests.

About plugin

  • Plugin page: nx-adstxt
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.5
  • WordPress version: 5.9.2
  • First release: Jun 28, 2018
  • Latest release: Jul 4, 2018
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: mdnx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 530 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by MAIRDUMONT NETLETIX ads.txt Agent
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0256.24 ▼2.94
Dashboard /wp-admin3.44 ▲0.0434.18 ▼8.76
Posts /wp-admin/edit.php3.67 ▲0.0340.99 ▲1.27
Add New Post /wp-admin/post-new.php6.90 ▼0.0793.99 ▼1,184.47
Media Library /wp-admin/upload.php3.32 ▲0.0227.61 ▼1.51
MD-NX ads.txt Agent /wp-admin/options-general.php?page=nx-adstxt3.3326.40

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 1 new option
New WordPress options
nx_adstxt

Browser metrics Passed 4 tests

A check of browser resources used by MAIRDUMONT NETLETIX ads.txt Agent
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,796 ▲7415.80 ▲0.155.93 ▲0.542.13 ▼0.05
Dashboard /wp-admin2,890 ▲296.12 ▼0.06138.53 ▼9.36182.33 ▲20.51
Posts /wp-admin/edit.php2,693 ▲53.23 ▼0.0163.81 ▼0.16145.83 ▼8.01
Add New Post /wp-admin/post-new.php1,671 ▼4618.08 ▼3.21409.24 ▼26.93154.97 ▼13.80
Media Library /wp-admin/upload.php1,697 ▼15.51 ▼0.02138.05 ▼6.94257.51 ▲63.67
MD-NX ads.txt Agent /wp-admin/options-general.php?page=nx-adstxt1,2984.27107.02125.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • nx_adstxt

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
Everything seems fine, however 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
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/nx-adstxt/admin/partials/row-url.php on line 6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/nx-adstxt/admin/partials/nx-adstxt-admin-display.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/nx-adstxt/admin/partials/row-url.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add descriptions for these screenshots #1, #2 in nx-adstxt/assets to your readme.txt
Please take inspiration from this readme.txt

nx-adstxt/nx-adstxt.php 92% from 13 tests

The main file in "MAIRDUMONT NETLETIX ads.txt Agent" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 189 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin938 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP1213177485
JavaScript1470218
CSS1244124
PO File12425111

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.14
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods43
▷ Static methods1227.91%
▷ Public methods3581.40%
▷ Protected methods00.00%
▷ Private methods818.60%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/logo-mdnx.png5.27KB2.72KB▼ 48.40%