89% wp-niche-products

Code Review | WP Niche Products

WordPress plugin WP Niche Products scored89%from 54 tests.

About plugin

  • Plugin page: wp-niche-products
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2019
  • Latest release: Feb 24, 2019
  • Number of updates: 21
  • Update frequency: every 0.9 days
  • Top authors: hmbashar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /689 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.01ms] Passed 4 tests

An overview of server-side resources used by WP Niche Products
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.90 ▼4.54
Dashboard /wp-admin3.31 ▲0.0047.37 ▼4.06
Posts /wp-admin/edit.php3.36 ▲0.0048.18 ▼4.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.10 ▼11.34
Media Library /wp-admin/upload.php3.23 ▲0.0036.17 ▼1.88

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Niche Products
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.23 ▼0.321.72 ▲0.1737.17 ▼3.32
Dashboard /wp-admin2,195 ▲215.62 ▲0.0492.14 ▼27.3740.65 ▼21.42
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0239.81 ▼9.0236.53 ▲1.94
Add New Post /wp-admin/post-new.php1,526 ▼323.77 ▲0.58703.55 ▲91.4062.63 ▲11.00
Media Library /wp-admin/upload.php1,400 ▲34.20 ▼0.01107.37 ▲8.3546.64 ▲2.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed: Please take inspiration from this readme.txt

wp-niche-products/wpniche.php 85% from 13 tests

The main file in "WP Niche Products" v. 1.0.1 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 148 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-niche-products.php" instead of "wpniche.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin312 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP31927135
CSS3219103
Markdown141074

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.38MB with 0.26MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-1.png163.12KB42.25KB▼ 74.10%
assets/images/banner-772x250.png50.68KB17.49KB▼ 65.49%
assets/images/Amazon-Logo.png8.95KB3.74KB▼ 58.25%
assets/images/screenshot-2.png161.94KB41.29KB▼ 74.50%