10% nsst-amz

Code Review | NSST AMZ

WordPress plugin NSST AMZ scored10%from 54 tests.

About plugin

  • Plugin page: nsst-amz
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.2.1
  • WordPress version: 6.3.1
  • First release: Nov 26, 2015
  • Latest release: Nov 26, 2015
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: nvmanh90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /941 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/nsst-amz/nsstlink.php+260
    Undefined variable: nsst_db_version

Server metrics [RAM: ▲0.06MB] [CPU: ▼8.35ms] Passed 4 tests

An overview of server-side resources used by NSST AMZ
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.55 ▼5.15
Dashboard /wp-admin3.37 ▲0.0341.94 ▼16.80
Posts /wp-admin/edit.php3.48 ▲0.1346.63 ▲0.85
Add New Post /wp-admin/post-new.php5.95 ▲0.0781.30 ▼12.28
Media Library /wp-admin/upload.php3.29 ▲0.0735.09 ▲1.35
NSST AMAZON /wp-admin/options-general.php?page=my-nsst-setting-admin3.2631.96

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: 2 new tables, 7 new options
New tables
wp_nsstlink
wp_nsstlink_log
New WordPress options
nsst_db_version
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for NSST AMZ
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.54 ▼0.841.63 ▼0.2642.76 ▼1.56
Dashboard /wp-admin2,210 ▲215.83 ▼0.2596.35 ▼25.0636.37 ▼8.41
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0434.37 ▼2.7635.18 ▲3.19
Add New Post /wp-admin/post-new.php1,540 ▲2623.02 ▲5.53662.89 ▼37.7054.64 ▼11.18
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0694.45 ▼2.2842.25 ▼3.59
NSST AMAZON /wp-admin/options-general.php?page=my-nsst-setting-admin7862.0324.8835.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_nsstlink
    • wp_nsstlink_log
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • nsst_db_version
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

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
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 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/nsst-amz/setting.php:153
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/nsst-amz/setting.php:153

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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: Add descriptions for screenshots #1, #2, #3 in nsst-amz/assets to your readme.txt
You can look at the official readme.txt

nsst-amz/nsstlink.php 92% from 13 tests

This is the main PHP file of "NSST AMZ" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nsst-amz.php" instead of "nsstlink.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected348 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP39092348

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.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
PNG images were not found in this plugin