90% contextual-feed-widget

Code Review | Contextual Feed Widget

WordPress plugin Contextual Feed Widget scored90%from 54 tests.

About plugin

  • Plugin page: contextual-feed-w...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1
  • WordPress version: 6.3.1
  • First release: Nov 13, 2018
  • Latest release: Feb 15, 2019
  • Number of updates: 11
  • Update frequency: every 8.6 days
  • Top authors: johnridesabike (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /590 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.01MB] [CPU: ▼1.84ms] Passed 4 tests

A check of server-side resources used by Contextual Feed Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.33 ▼0.72
Dashboard /wp-admin3.32 ▲0.0151.81 ▲4.91
Posts /wp-admin/edit.php3.37 ▲0.0146.33 ▲2.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.07 ▼6.30
Media Library /wp-admin/upload.php3.24 ▲0.0136.40 ▼2.61

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_contextual_feed_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contextual Feed Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.091.67 ▼0.0345.00 ▼2.64
Dashboard /wp-admin2,206 ▲175.90 ▲0.92104.57 ▼16.4439.64 ▼5.35
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0435.02 ▼0.8236.18 ▲0.08
Add New Post /wp-admin/post-new.php1,542 ▲2818.26 ▲0.65634.18 ▼55.5157.20 ▲2.68
Media Library /wp-admin/upload.php1,382 ▼64.22 ▼0.0595.33 ▼9.0941.84 ▼3.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_contextual_feed_widget
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
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 just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
No plugin tags provided

contextual-feed-widget/contextual-feed-widget.php 92% from 13 tests

The primary PHP file in "Contextual Feed Widget" version 1.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin134 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2855134

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin