84% nx-ads

Code Review | MAIRDUMONT NETLETIX Ads

WordPress plugin MAIRDUMONT NETLETIX Ads scored84%from 54 tests.

About plugin

  • Plugin page: nx-ads
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Mar 4, 2019
  • Latest release: Jun 25, 2020
  • Number of updates: 5
  • Update frequency: every 97.6 days
  • Top authors: mdnx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /614 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼5.85ms] Passed 4 tests

This is a short check of server-side resources used by MAIRDUMONT NETLETIX Ads
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2437.41 ▼6.42
Dashboard /wp-admin3.53 ▲0.2251.16 ▼3.42
Posts /wp-admin/edit.php3.64 ▲0.2950.44 ▼0.83
Add New Post /wp-admin/post-new.php6.11 ▲0.2386.87 ▼12.74
Media Library /wp-admin/upload.php3.45 ▲0.2238.53 ▲2.37
MD-NX Ads /wp-admin/options-general.php?page=nx-ads3.4640.74

Server storage [IO: ▲0.13MB] [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: 31 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_nx_ad_widget
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
nx_ads

Browser metrics Passed 4 tests

Checking browser requirements for MAIRDUMONT NETLETIX Ads
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7814.41 ▲0.232.10 ▲0.2142.70 ▼1.11
Dashboard /wp-admin2,199 ▲195.53 ▼0.2088.59 ▼6.5037.19 ▼2.73
Posts /wp-admin/edit.php2,108 ▲112.00 ▼0.0435.48 ▼1.4034.07 ▼2.74
Add New Post /wp-admin/post-new.php6,244 ▲4,69618.82 ▼4.56891.63 ▲212.9254.72 ▼8.29
Media Library /wp-admin/upload.php1,407 ▲104.26 ▲0.1097.41 ▼6.0343.63 ▼3.22
MD-NX Ads /wp-admin/options-general.php?page=nx-ads2,0723.7879.9439.76

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_nx_ad_widget
    • theysaidso_admin_options
    • db_upgraded
    • nx_ads
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/nx-ads/admin/partials/row-container.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/nx-ads/admin/partials/row-zone.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/nx-ads/admin/partials/nx-ads-admin-display.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nx-ads/admin/class-nx-ads-admin.php:664
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nx-ads/admin/partials/row-container.php:9
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/nx-ads/admin/partials/row-container.php on line 2
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/nx-ads/admin/partials/row-container.php on line 4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/nx-ads/admin/partials/row-inread.php:4
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/nx-ads/admin/partials/row-container.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/nx-ads/admin/partials/nx-ads-admin-widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: advertising, banner-ads, mairdumont, netzathleten, nxlib...

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

"MAIRDUMONT NETLETIX Ads" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 207 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin2,400 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP16290781,314
JavaScript31117423
CSS2930369
PO File17578294

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity17.00
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods70
▷ Static methods811.43%
▷ Public methods5274.29%
▷ Protected methods00.00%
▷ Private methods1825.71%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/js/nx-ads.png2.41KB0.89KB▼ 63.02%
admin/assets/logo-mdnx.png5.27KB2.72KB▼ 48.40%