77% nsa-update-database-urls

Code Review | NSA UPDATE DATABASE URLS

WordPress plugin NSA UPDATE DATABASE URLS scored77%from 54 tests.

About plugin

  • Plugin page: nsa-update-databa...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 7, 2016
  • Latest release: Jun 22, 2016
  • Number of updates: 5
  • Update frequency: every 4.6 days
  • Top authors: Chahat Sharma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,010 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼12.62ms] Passed 4 tests

Server-side resources used by NSA UPDATE DATABASE URLS
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.85 ▼10.86
Dashboard /wp-admin3.35 ▲0.0142.82 ▼16.78
Posts /wp-admin/edit.php3.40 ▲0.0546.99 ▲2.64
Add New Post /wp-admin/post-new.php5.93 ▲0.0583.32 ▼24.24
Media Library /wp-admin/upload.php3.28 ▲0.0534.50 ▲1.39

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: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for NSA UPDATE DATABASE URLS
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.24 ▼0.981.61 ▼0.2241.78 ▼0.96
Dashboard /wp-admin2,207 ▲255.81 ▼0.07105.41 ▼1.6540.28 ▼3.93
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0238.75 ▼1.4835.40 ▼0.42
Add New Post /wp-admin/post-new.php1,538 ▲1023.36 ▲5.29652.95 ▲24.8361.14 ▲10.83
Media Library /wp-admin/upload.php1,386 ▼54.17 ▲0.0294.08 ▼10.5541.02 ▼3.65
Update URLs With NSA /wp-admin/nsa-update-database-urls.php260.440.0713.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please take a closer look at 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/nsa-update-database-urls/nsa-update-database-urls.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/nsa-update-database-urls.php
    • > Network (severe)
    wp-admin/nsa-update-database-urls.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (The Admin screen for the plugin) image missing
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

nsa-update-database-urls/nsa-update-database-urls.php 92% from 13 tests

This is the main PHP file of "NSA UPDATE DATABASE URLS" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 249 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin281 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11011281

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
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 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.12MB with 0.12MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshots/screenshot-1.png118.99KB0.00KB▼ 100.00%