83% show-next-upcoming-post-snup-widget

Code Review | Show Next Upcoming Post

WordPress plugin Show Next Upcoming Post scored83%from 54 tests.

About plugin

  • Plugin page: show-next-upcomin...
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2022
  • Latest release: Nov 14, 2022
  • Number of updates: 16
  • Update frequency: every 16.4 days
  • Top authors: bjovaar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /881 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.68ms] Passed 4 tests

A check of server-side resources used by Show Next Upcoming Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.88 ▼5.24
Dashboard /wp-admin3.33 ▼0.0141.33 ▼21.01
Posts /wp-admin/edit.php3.46 ▲0.1145.95 ▼0.82
Add New Post /wp-admin/post-new.php5.93 ▲0.0584.02 ▼11.66
Media Library /wp-admin/upload.php3.27 ▲0.0534.84 ▲1.10

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

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

Browser metrics Passed 4 tests

Show Next Upcoming Post: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9913.33 ▼0.961.69 ▼0.2240.84 ▼2.18
Dashboard /wp-admin2,249 ▲614.88 ▼1.02105.63 ▼8.5242.55 ▲0.10
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0240.38 ▲4.5833.97 ▲0.05
Add New Post /wp-admin/post-new.php6,257 ▲4,73818.70 ▼4.59901.09 ▲197.3366.13 ▲0.14
Media Library /wp-admin/upload.php1,382 ▼34.24 ▲0.04101.54 ▲0.1044.38 ▼0.11

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_snup_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 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 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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-next-upcoming-post-snup-widget/snup-widget.php:48

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 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: preview, post, next, upcoming

show-next-upcoming-post-snup-widget/snup-widget.php 85% from 13 tests

Analyzing the main PHP file in "Show Next Upcoming Post" version 1.3.1
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("show-next-upcoming-post-snup-widget.php" instead of "snup-widget.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
No dangerous file extensions were detected5,741 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
HTML143535,326
PO File46262208
PHP210287194
CSS13013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.71MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/banner-1544x500-rtl.png262.95KB106.11KB▼ 59.64%
assets/images/icon-128x128.png7.34KB2.64KB▼ 64.10%
assets/images/icon-256x256.png12.56KB4.51KB▼ 64.10%
assets/images/banner-1544x500.png262.95KB106.11KB▼ 59.64%
assets/images/banner-772x250-rtl.png90.70KB32.37KB▼ 64.31%