74% media-consumption-log

Code Review | Media Consumption Log

WordPress plugin Media Consumption Log scored74%from 54 tests.

About plugin

  • Plugin page: media-consumption...
  • Plugin version: 2.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Mar 26, 2015
  • Latest release: Jan 28, 2018
  • Number of updates: 63
  • Update frequency: every 19.4 days
  • Top authors: hurik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,602 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.13ms] Passed 4 tests

An overview of server-side resources used by Media Consumption Log
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.11 ▼8.76
Dashboard /wp-admin3.35 ▲0.0047.29 ▼12.18
Posts /wp-admin/edit.php3.40 ▲0.0442.30 ▼5.11
Add New Post /wp-admin/post-new.php5.93 ▲0.0591.89 ▼6.45
Media Library /wp-admin/upload.php3.27 ▲0.0435.39 ▲0.09
Serials Status /wp-admin/admin.php?page=mcl-serials-status3.2330.80
Forgotten /wp-admin/admin.php?page=mcl-forgotten3.2432.41
Settings /wp-admin/admin.php?page=mcl-settings3.2533.46
Quick Post /wp-admin/admin.php?page=mcl-quick-post3.2430.66

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Media Consumption Log
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.17 ▼0.211.48 ▼0.0738.54 ▼0.51
Dashboard /wp-admin2,236 ▲565.64 ▼0.0183.61 ▼0.6240.76 ▼1.01
Posts /wp-admin/edit.php2,138 ▲381.96 ▼0.0336.76 ▼4.5333.98 ▼4.08
Add New Post /wp-admin/post-new.php1,565 ▲3718.42 ▼4.73599.95 ▼39.3961.99 ▲13.15
Media Library /wp-admin/upload.php1,438 ▲384.22 ▲0.0594.52 ▼1.3443.72 ▲4.43
Serials Status /wp-admin/admin.php?page=mcl-serials-status8161.6925.3026.45
Forgotten /wp-admin/admin.php?page=mcl-forgotten8131.6624.6824.63
Settings /wp-admin/admin.php?page=mcl-settings1,2121.8123.9030.15
Quick Post /wp-admin/admin.php?page=mcl-quick-post8131.6924.1324.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_mcl_status
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • mcl_db_version
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/media-consumption-log/MclStatus.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-consumption-log/MclHooks.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/media-consumption-log/MclAdminHooks.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/media-consumption-log/MclStatistics.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/media-consumption-log/MclAdminHooks.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: The official readme.txt might help

media-consumption-log/media-consumption-log.php 92% from 13 tests

This is the main PHP file of "Media Consumption Log" version 2.4.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,944 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP137223352,505
JavaScript36342353
CSS3224286

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity34.83
▷ Minimum class complexity5.00
▷ Maximum class complexity104.00
Average method complexity5.21
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods73
▷ Static methods7298.63%
▷ Public methods6183.56%
▷ Protected methods00.00%
▷ Private methods1216.44%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants28
▷ Global constants13.57%
▷ Class constants2796.43%
▷ Public constants27100.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
There are no PNG files in this plugin