64% nord-sub-news

Code Review | Nord Sub News

WordPress plugin Nord Sub News scored64%from 54 tests.

About plugin

  • Plugin page: nord-sub-news
  • Plugin version: 1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.1
  • WordPress version: 6.3.1
  • First release: Mar 13, 2019
  • Latest release: Mar 13, 2019
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: nord07 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /511 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.55ms] Passed 4 tests

Server-side resources used by Nord Sub News
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0348.64 ▲4.64
Dashboard /wp-admin3.32 ▼0.0249.07 ▼13.00
Posts /wp-admin/edit.php3.37 ▲0.0248.50 ▼3.44
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.88 ▼20.26
Media Library /wp-admin/upload.php3.25 ▲0.0241.06 ▲2.51

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: 1 new table, 7 new options
New tables
wp_nsn
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_my_widget
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Nord Sub News
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.22 ▼0.132.18 ▲0.3142.59 ▼3.06
Dashboard /wp-admin2,210 ▲305.65 ▲0.0096.39 ▲5.2442.07 ▼2.03
Posts /wp-admin/edit.php2,112 ▲92.00 ▼0.0235.82 ▲1.5734.67 ▼3.44
Add New Post /wp-admin/post-new.php1,539 ▲1323.68 ▲0.41672.43 ▲12.9554.74 ▲5.19
Media Library /wp-admin/upload.php1,412 ▲124.28 ▲0.10100.31 ▼8.3544.72 ▲2.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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 validation failed for this plugin
    • > Notice in wp-content/plugins/nord-sub-news/nsn_common.php+26
    Undefined index: nsndelall
  • Zombie tables detected upon uninstall: 1 table
    • wp_nsn
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_my_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

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
Good news, no errors were detected

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/nord-sub-news/admin/nsn_index.php:1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: There are too many tags (23 tag instead of maximum 10)
You can take inspiration from this readme.txt

nord-sub-news/nord_sub_news.php 92% from 13 tests

"Nord Sub News" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nord-sub-news.php" instead of "nord_sub_news.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin519 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP323733519

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/Nord.png16.55KB1.97KB▼ 88.09%
admin/Nord2-01.png16.02KB1.67KB▼ 89.57%