84% the-media-widget

Code Review | The Media Widget

WordPress plugin The Media Widget scored84%from 54 tests.

About plugin

  • Plugin page: the-media-widget
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-4.6
  • WordPress version: 6.3.1
  • First release: Oct 14, 2015
  • Latest release: Aug 21, 2016
  • Number of updates: 6
  • Update frequency: every 52.0 days
  • Top authors: Alobaidi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,495 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by The Media Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0032.96 ▼7.92
Dashboard /wp-admin3.31 ▲0.0149.71 ▲4.09
Posts /wp-admin/edit.php3.36 ▲0.0155.61 ▲9.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.06 ▼14.41
Media Library /wp-admin/upload.php3.23 ▲0.0132.79 ▼0.97

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

The Media Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.111.58 ▲0.0541.83 ▲4.36
Dashboard /wp-admin2,189 ▲95.55 ▼0.0294.81 ▲6.2440.94 ▼2.22
Posts /wp-admin/edit.php2,100 ▼31.99 ▲0.0239.36 ▼1.9536.23 ▲0.80
Add New Post /wp-admin/post-new.php1,528 ▲223.03 ▼0.19666.07 ▼39.5666.48 ▲7.39
Media Library /wp-admin/upload.php1,397 ▼04.15 ▼0.01108.80 ▲14.0848.10 ▲2.00

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: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/the-media-widget/the-media-widget.php
    • > /wp-content/plugins/the-media-widget/uninstall.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 41 tag instead of maximum 10
You can take inspiration from this readme.txt

the-media-widget/the-media-widget.php 92% from 13 tests

"The Media Widget" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin69 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3392969

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.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
No PNG images were found in this plugin