89% wp-trending-post-slider-and-widget

Code Review | Trending/Popular Post Slider and Widget

WordPress plugin Trending/Popular Post Slider and Widget scored89%from 54 tests.

About plugin

  • Plugin page: wp-trending-post-...
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 26, 2016
  • Latest release: Nov 27, 2023
  • Number of updates: 72
  • Update frequency: every 39.3 days
  • Top authors: anoopranawat (56.94%)wponlinesupport (44.44%)

Code review

54 tests

User reviews

21 reviews

Install metrics

4,000+ active /122,932 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▼5.93ms] Passed 4 tests

This is a short check of server-side resources used by Trending/Popular Post Slider and Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4236.18 ▼6.00
Dashboard /wp-admin3.84 ▲0.4947.87 ▼21.27
Posts /wp-admin/edit.php3.89 ▲0.5352.48 ▲4.23
Add New Post /wp-admin/post-new.php6.39 ▲0.5095.50 ▲0.99
Media Library /wp-admin/upload.php3.70 ▲0.4736.47 ▲2.56

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 78 new files
Database: no new tables, 11 new options
New WordPress options
wpos_anylc_site_uid
widget_theysaidso_widget
wtpsw_plugin_version
widget_recent-comments
can_compress_scripts
wtpsw_options
widget_wtpsw-post-list-widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by Trending/Popular Post Slider and Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,653 ▼1,09410.54 ▼3.815.51 ▲3.7617.50 ▼26.11
Dashboard /wp-admin2,225 ▲505.67 ▼0.01101.13 ▼16.6053.48 ▲8.17
Posts /wp-admin/edit.php2,126 ▲262.03 ▲0.0240.66 ▼2.0637.92 ▲0.62
Add New Post /wp-admin/post-new.php6,223 ▲4,68826.12 ▲2.85910.21 ▲316.4253.51 ▼6.16
Media Library /wp-admin/upload.php1,417 ▲204.27 ▲0.03100.77 ▲1.2139.72 ▼0.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 11 options in the database
    • theysaidso_admin_options
    • wtpsw_plugin_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_wtpsw-post-list-widget
    • can_compress_scripts
    • wtpsw_options
    • wpos_anylc_site_uid
    • wpos_anylc_redirect
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

wp-trending-post-slider-and-widget/wp-trending-post-slider-widget.php 85% from 13 tests

Analyzing the main PHP file in "Trending/Popular Post Slider and Widget" version 1.8
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-trending-post-slider-and-widget.php" instead of "wp-trending-post-slider-widget.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,789 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP307891,0203,038
JavaScript712168386
CSS6149187
PO File17281176
JSON2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity19.82
▷ Minimum class complexity3.00
▷ Maximum class complexity87.00
Average method complexity4.98
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes218.18%
Methods52
▷ Static methods23.85%
▷ Public methods4892.31%
▷ Protected methods00.00%
▷ Private methods47.69%
Functions43
▷ Named functions43100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
28 PNG files occupy 0.45MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/g-logo.png41.17KB14.04KB▼ 65.90%
wpos-plugins/assets/images/utility-icon.png0.72KB0.82KB0.00%
wpos-analytics/assets/images/icon.png9.48KB3.75KB▼ 60.49%
assets/images/vc-icon.png5.24KB1.92KB▼ 63.42%
assets/images/arrow-left.png1.15KB0.17KB▼ 85.11%