48% header-images-rotator

Code Review | ntp-header-images

WordPress plugin ntp-header-images scored48%from 54 tests.

About plugin

  • Plugin page: header-images-rot...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.9
  • WordPress version: 6.3.1
  • First release: Jan 14, 2013
  • Latest release: Nov 23, 2017
  • Number of updates: 14
  • Update frequency: every 126.7 days
  • Top authors: nord_tramper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,509 total downloads

Benchmarks

Plugin footprint 30% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼1.20MB] [CPU: ▼39.22ms] Passed 4 tests

Server-side resources used by ntp-header-images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.6916.17 ▼22.16
Dashboard /wp-admin2.81 ▼0.4916.37 ▼30.20
Posts /wp-admin/edit.php2.81 ▼0.5416.29 ▼31.43
Add New Post /wp-admin/post-new.php2.81 ▼3.0716.16 ▼73.09
Media Library /wp-admin/upload.php2.81 ▼0.4216.32 ▼17.70
ntpHeaderImages settings /wp-admin/options-general.php?page=ntp-header-images2.8115.64

Server storage [IO: ▲0.13MB] [DB: ▲0.31MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: 1 new table, 9 new options
New tables
wp_ntp_header_images
New WordPress options
can_compress_scripts
ntpHeaderImagesWidth
widget_recent-posts
theysaidso_admin_options
ntpHeaderImagesHeight
widget_recent-comments
widget_theysaidso_widget
ntpHeaderImagesCount
db_upgraded

Browser metrics Passed 4 tests

ntp-header-images: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.33 ▼0.041.82 ▼0.2748.99 ▼0.14
Dashboard /wp-admin2,199 ▲295.67 ▲0.0285.60 ▼14.7841.83 ▲3.79
Posts /wp-admin/edit.php2,101 ▼21.98 ▼0.0534.76 ▼0.5833.90 ▼1.55
Add New Post /wp-admin/post-new.php1,552 ▲2418.36 ▼4.67638.52 ▲19.4074.95 ▲21.98
Media Library /wp-admin/upload.php1,401 ▲14.25 ▲0.0895.89 ▲1.7340.48 ▼2.09
ntpHeaderImages settings /wp-admin/options-general.php?page=ntp-header-images8502.0128.6228.58

Uninstaller [IO: ▲0.13MB] [DB: ▲0.31MB] 0% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • Uninstaller has failed for this plugin, leaving 6 files (0.13MB) in the plugin directory
    • (new file) translate/ntp-header-images.po
    • (new file) translate/ntp-header-images-ru_RU.mo
    • (new file) screenshot-1.jpg
    • (new file) readme.txt
    • (new file) style.css
    • (new file) ntp-header-images.php
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_ntp_header_images
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=ntp-header-images
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ntp-header-images
    • > Notice in wp-content/plugins/header-images-rotator/ntp-header-images.php+154
    Undefined index: action

SRP 50% from 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
Please fix the following
  • 1× 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/header-images-rotator/ntp-header-images.php:35

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)
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 to be fixed:
  • Screenshots: Screenshot #1 (How it looks like) image missing
The official readme.txt might help

header-images-rotator/ntp-header-images.php 92% from 13 tests

"ntp-header-images" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("header-images-rotator.php" instead of "ntp-header-images.php")

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
There were no executable files found in this plugin331 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13861263
PO File1172246
CSS12022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin