10% newest-posts

Code Review | Newest Posts Widget

WordPress plugin Newest Posts Widget scored10%from 54 tests.

About plugin

  • Plugin page: newest-posts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 1, 2018
  • Latest release: Apr 1, 2018
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: nipun21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /591 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/newest-posts/newest-posts.php+280
    Function create_function() is deprecated

Server metrics [RAM: ▼1.84MB] [CPU: ▼51.87ms] Passed 4 tests

A check of server-side resources used by Newest Posts Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.315.17 ▼37.62
Dashboard /wp-admin2.17 ▼1.135.39 ▼43.73
Posts /wp-admin/edit.php2.17 ▼1.186.45 ▼42.08
Add New Post /wp-admin/post-new.php2.17 ▼3.726.82 ▼84.06
Media Library /wp-admin/upload.php2.17 ▼1.065.42 ▼33.31

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: 3 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_np-widget
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Newest Posts Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.22 ▼1.361.82 ▼0.2042.38 ▼3.44
Dashboard /wp-admin2,206 ▲154.85 ▼0.07106.37 ▼10.2938.14 ▼4.36
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0639.85 ▲3.6935.86 ▲1.29
Add New Post /wp-admin/post-new.php1,533 ▼523.17 ▼0.08673.19 ▼18.0950.61 ▼10.83
Media Library /wp-admin/upload.php1,385 ▼04.23 ▼0.0395.84 ▼18.0740.36 ▼8.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/newest-posts/newest-posts.php+280
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • widget_np-widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
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 a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The widget configuration dialog.), #2 (Front end of the widget showing full features of the plugin in a default WordPress Theme.), #3 (Newest Posts list showing post title only.)
The official readme.txt is a good inspiration

newest-posts/newest-posts.php Passed 13 tests

The main file in "Newest Posts Widget" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
91 characters long description:
A widget that display the new posts of your site with Thumbnail, Excerpt, Date etc options.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin231 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14942189
CSS11442

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity12.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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin