84% content-widget

Code Review | Content Widget

WordPress plugin Content Widget scored84%from 54 tests.

About plugin

  • Plugin page: content-widget
  • Plugin version: 0.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.6
  • WordPress version: 6.3.1
  • First release: Apr 24, 2012
  • Latest release: Aug 30, 2016
  • Number of updates: 56
  • Update frequency: every 28.4 days
  • Top authors: shazdeh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /10,970 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by Content Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0146.79 ▲4.63
Dashboard /wp-admin3.32 ▲0.0259.13 ▲7.64
Posts /wp-admin/edit.php3.37 ▲0.0158.92 ▲11.77
Add New Post /wp-admin/post-new.php5.92 ▲0.03127.34 ▲26.26
Media Library /wp-admin/upload.php3.24 ▲0.0145.76 ▲13.76

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_content
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Content Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▲0.151.85 ▲0.1949.23 ▲5.62
Dashboard /wp-admin2,191 ▲145.63 ▲0.05113.08 ▲0.2655.05 ▲4.71
Posts /wp-admin/edit.php2,105 ▲81.99 ▼0.1648.68 ▲11.0239.80 ▲6.21
Add New Post /wp-admin/post-new.php1,528 ▲220.78 ▼2.61827.46 ▲146.7065.81 ▲11.92
Media Library /wp-admin/upload.php1,399 ▲54.18 ▼0.03125.47 ▲6.1959.63 ▲4.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_content
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/content-widget/views/form.php
    • > /wp-content/plugins/content-widget/init.php
    • > /wp-content/plugins/content-widget/views/widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: post, content, widget, sidebar

content-widget/init.php 92% from 13 tests

The primary PHP file in "Content Widget" version 0.4.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("content-widget.php" instead of "init.php")

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
There were no executable files found in this plugin203 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34157183
JavaScript11320

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin