84% tw-recent-posts-widget

Code Review | TW Recent Posts Widget

WordPress plugin TW Recent Posts Widget scored 84% from 54 tests.

About plugin

  • Plugin page: tw-recent-posts-w...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 23, 2012
  • Latest release: Jan 8, 2016
  • Number of updates: 9
  • Update frequency: every 126.7 days
  • Top authors: tweetysha (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

3,000+ active / 67,570 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.01ms] Passed 4 tests

A check of server-side resources used by TW Recent Posts Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.63 ▼2.45
Dashboard /wp-admin3.32 ▲0.0146.90 ▼2.29
Posts /wp-admin/edit.php3.37 ▲0.0148.43 ▲3.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.99 ▲10.50
Media Library /wp-admin/upload.php3.24 ▲0.0135.68 ▲1.53

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TW Recent Posts Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.59 ▼0.841.72 ▼0.5643.62 ▼0.98
Dashboard /wp-admin2,209 ▲215.88 ▲0.95107.32 ▲3.9841.44 ▼4.74
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0239.21 ▲1.1235.14 ▲0.61
Add New Post /wp-admin/post-new.php1,536 ▲123.25 ▲0.05578.40 ▼49.2147.47 ▼7.66
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.04101.88 ▲0.4140.79 ▼4.30

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_tw-recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tw-recent-posts-widget/tw-recent-posts-widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (The widget configuration dialog.2. The widget output based on it's settings)
You can look at the official readme.txt

tw-recent-posts-widget/tw-recent-posts-widget.php 92% from 13 tests

"TW Recent Posts Widget" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 162 characters long)

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
No dangerous file extensions were detected270 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14641235
CSS1101035

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity60.00
▷ Minimum class complexity60.00
▷ Maximum class complexity60.00
Average method complexity10.83
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png96.23KB30.60KB▼ 68.21%
screenshot-1.png58.20KB18.95KB▼ 67.44%