90% nh-featured-posts

Code Review | My Featured Posts Widget

WordPress plugin My Featured Posts Widget scored90%from 54 tests.

About plugin

  • Plugin page: nh-featured-posts
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.3
  • WordPress version: 6.3.1
  • First release: Dec 10, 2019
  • Latest release: Dec 10, 2019
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: nazaninhesamzadeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /411 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.35ms] Passed 4 tests

Server-side resources used by My Featured Posts Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.95 ▲2.36
Dashboard /wp-admin3.34 ▼0.0147.97 ▼12.05
Posts /wp-admin/edit.php3.39 ▲0.0346.57 ▼4.12
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.22 ▼22.89
Media Library /wp-admin/upload.php3.26 ▲0.0334.00 ▼2.35

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_mfpw_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for My Featured Posts Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▲0.002.25 ▲0.2944.30 ▲1.57
Dashboard /wp-admin2,198 ▲235.63 ▼0.1195.30 ▼3.9242.66 ▼2.18
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0433.47 ▼7.3633.32 ▼3.81
Add New Post /wp-admin/post-new.php6,221 ▲4,69519.10 ▼3.97900.71 ▲191.2059.57 ▲10.95
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.12105.94 ▲9.0251.90 ▲6.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_mfpw_widget
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: post, category, featuredposts, postswidget

nh-featured-posts/nh-featured-posts.php Passed 13 tests

The primary PHP file in "My Featured Posts Widget" version 1.0.0 is used by WordPress to initiate all plugin functionality
69 characters long description:
Showing five recent featured posts in "Featured Posts Loader" widget.

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
Everything looks great! No dangerous files found in this plugin119 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11221119

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.50
▷ Minimum class complexity7.00
▷ Maximum class complexity8.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin