84% media-placeholders

Code Review | Media Placeholders

WordPress plugin Media Placeholders scored84%from 54 tests.

About plugin

  • Plugin page: media-placeholders
  • Plugin version: 0.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6.1
  • WordPress version: 6.3.1
  • First release: Aug 12, 2013
  • Latest release: Feb 25, 2015
  • Number of updates: 7
  • Update frequency: every 80.3 days
  • Top authors: westonruter (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,555 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.00MB] [CPU: ▼4.43ms] Passed 4 tests

An overview of server-side resources used by Media Placeholders
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.73 ▼0.07
Dashboard /wp-admin3.31 ▲0.0052.52 ▲6.74
Posts /wp-admin/edit.php3.36 ▲0.0047.02 ▼2.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.72 ▼15.55
Media Library /wp-admin/upload.php3.23 ▲0.0035.86 ▲0.36

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Media Placeholders
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.27 ▼1.111.71 ▼0.3941.13 ▼5.12
Dashboard /wp-admin2,209 ▲185.88 ▼0.0297.96 ▼3.6239.10 ▼6.01
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0136.42 ▼4.7833.88 ▼4.09
Add New Post /wp-admin/post-new.php1,537 ▲1823.23 ▲0.49673.04 ▲17.4060.37 ▼1.93
Media Library /wp-admin/upload.php1,391 ▲64.16 ▼0.08104.76 ▲0.3350.59 ▲3.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-placeholders/media-placeholders.php:190

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: 404, development, uploads, placeholders, images

media-placeholders/media-placeholders.php Passed 13 tests

The primary PHP file in "Media Placeholders" version 0.9.2 is used by WordPress to initiate all plugin functionality
140 characters long description:
Redirect requests to non-existent uploaded images to a placeholder service like placehold.it or placekitten.com. For use during development.

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
Everything looks great! No dangerous files found in this plugin523 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP345105284
Bourne Again Shell13010110
Markdown426074
Bourne Shell2121136
YAML14019

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.50
▷ Minimum class complexity16.00
▷ Maximum class complexity23.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods571.43%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.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 files were detected