10% ns-author-widget

Code Review | NS Author Widget

WordPress plugin NS Author Widget scored10%from 54 tests.

About plugin

  • Plugin page: ns-author-widget
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2015
  • Latest release: May 11, 2016
  • Number of updates: 17
  • Update frequency: every 20.2 days
  • Top authors: misharnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,560 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/ns-author-widget/ns-author-widget.php+28
    Methods with the same name as their class will not be constructors in a future version of PHP; ns_aw_info has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.29ms] Passed 4 tests

Analyzing server-side resources used by NS Author Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.32 ▼40.28
Dashboard /wp-admin2.10 ▼1.205.26 ▼43.90
Posts /wp-admin/edit.php2.10 ▼1.256.68 ▼39.85
Add New Post /wp-admin/post-new.php2.10 ▼3.796.28 ▼85.13
Media Library /wp-admin/upload.php2.10 ▼1.135.35 ▼26.16

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_ns_aw_info
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for NS Author Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3513.22 ▼1.181.79 ▼0.3539.80 ▼4.35
Dashboard /wp-admin2,206 ▲214.85 ▼1.0299.41 ▼1.0540.62 ▼0.93
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0338.85 ▲1.8735.69 ▲2.89
Add New Post /wp-admin/post-new.php1,538 ▲123.42 ▲0.20633.51 ▲14.3754.16 ▼5.37
Media Library /wp-admin/upload.php1,385 ▼64.16 ▼0.0997.97 ▼6.3143.51 ▼0.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/ns-author-widget/ns-author-widget.php+28
    Methods with the same name as their class will not be constructors in a future version of PHP; ns_aw_info has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_ns_aw_info
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-author-widget/ns-author-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #5 (Widget Panel.)
You can take inspiration from this readme.txt

ns-author-widget/ns-author-widget.php 92% from 13 tests

The main file in "NS Author Widget" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin305 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13011155
CSS1321150

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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 Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/link.png0.46KB0.44KB▼ 4.83%
image/googleplus.png1.78KB1.59KB▼ 10.59%
image/facebook.png1.89KB1.65KB▼ 12.42%
image/youtube.png1.87KB1.63KB▼ 12.91%
image/twitter.png2.11KB1.65KB▼ 21.70%