90% pco-media-handler

Code Review | Pco Media Handler

WordPress plugin Pco Media Handler scored90%from 54 tests.

About plugin

  • Plugin page: pco-media-handler
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9.2
  • WordPress version: 6.3.1
  • First release: Jun 24, 2014
  • Latest release: Jul 21, 2014
  • Number of updates: 10
  • Update frequency: every 2.9 days
  • Top authors: jamesbonham (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,522 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
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼2.72ms] Passed 4 tests

Server-side resources used by Pco Media Handler
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.04 ▲3.33
Dashboard /wp-admin3.31 ▼0.0351.06 ▼4.94
Posts /wp-admin/edit.php3.36 ▲0.0150.11 ▲4.52
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.51 ▼12.88
Media Library /wp-admin/upload.php3.24 ▲0.0136.26 ▲3.62

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Pco Media Handler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5713.73 ▼0.831.55 ▼0.2139.17 ▼4.16
Dashboard /wp-admin2,203 ▲145.79 ▼0.1497.67 ▼8.6136.85 ▼1.15
Posts /wp-admin/edit.php2,089 ▲32.16 ▲0.1640.23 ▲0.5934.31 ▼0.81
Add New Post /wp-admin/post-new.php1,533 ▲623.38 ▲0.01658.62 ▲32.8650.84 ▼2.04
Media Library /wp-admin/upload.php1,385 ▼64.23 ▲0.06102.62 ▲9.0045.59 ▲2.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: media, oembed, embed, tablet, image...

pco-media-handler/pco-media-handler.php Passed 13 tests

The main PHP script in "Pco Media Handler" version 1.2 is automatically included on every request by WordPress
114 characters long description:
Improve the markup of featured images, inline images and embeds, and make them all responsive to all screen sizes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin154 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP456172154

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.50
▷ Minimum class complexity4.00
▷ Maximum class complexity17.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods1285.71%
▷ Protected methods00.00%
▷ Private methods214.29%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected