83% simple-feed-widget

Code Review | Simple Feed Widget

WordPress plugin Simple Feed Widget scored83%from 54 tests.

About plugin

  • Plugin page: simple-feed-widget
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2
  • WordPress version: 6.3.1
  • First release: Aug 21, 2019
  • Latest release: Aug 21, 2019
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: artdevstudios1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.08ms] Passed 4 tests

Analyzing server-side resources used by Simple Feed Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.88 ▼1.90
Dashboard /wp-admin3.35 ▲0.0555.13 ▼1.29
Posts /wp-admin/edit.php3.40 ▲0.0557.03 ▲5.32
Add New Post /wp-admin/post-new.php5.93 ▲0.0590.98 ▼21.42
Media Library /wp-admin/upload.php3.27 ▲0.0541.13 ▲4.28

Server storage [IO: ▲0.09MB] [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: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_simple-feed-widget
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Simple Feed Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.19 ▼0.561.86 ▲0.2947.00 ▲3.53
Dashboard /wp-admin2,198 ▲185.61 ▲0.0096.45 ▲5.0241.84 ▲1.39
Posts /wp-admin/edit.php2,100 ▲31.99 ▲0.0134.03 ▼2.5534.43 ▼2.72
Add New Post /wp-admin/post-new.php1,526 ▼223.17 ▲0.06678.63 ▲23.1157.67 ▼1.91
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.00107.50 ▲0.0546.16 ▼0.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_simple-feed-widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-feed-widget/simple-twitter-feed-widget.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (backend Layout) image missing
You can take inspiration from this readme.txt

simple-feed-widget/simple-twitter-feed-widget.php 85% from 13 tests

The entry point to "Simple Feed Widget" version 1.1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-feed-widget.php" instead of "simple-twitter-feed-widget.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 180 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected817 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP321866817

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity9.27
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes218.18%
▷ Concrete classes981.82%
▷ Final classes00.00%
Methods76
▷ Static methods1013.16%
▷ Public methods6585.53%
▷ Protected methods22.63%
▷ Private methods911.84%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.05MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-2.png11.23KB0.00KB▼ 100.00%
(invalid) screenshot-3.png17.91KB0.00KB▼ 100.00%
(invalid) screenshot-1.png23.03KB0.00KB▼ 100.00%