83% media-count

Code Review | Media Count

WordPress plugin Media Count scored83%from 54 tests.

About plugin

  • Plugin page: media-count
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 28, 2022
  • Latest release: Dec 28, 2022
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: webbita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /222 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
This plugin's installer ran successfully

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

A check of server-side resources used by Media Count
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.12 ▲0.90
Dashboard /wp-admin3.31 ▲0.0148.48 ▼4.55
Posts /wp-admin/edit.php3.37 ▲0.0150.83 ▼0.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.66 ▼14.46
Media Library /wp-admin/upload.php3.24 ▲0.0138.45 ▲4.13

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

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

Browser metrics Passed 4 tests

Media Count: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.38 ▲0.031.96 ▲0.0243.85 ▼4.04
Dashboard /wp-admin2,200 ▲205.50 ▼0.0686.52 ▼4.6938.08 ▼5.30
Posts /wp-admin/edit.php2,114 ▲112.01 ▼0.0240.91 ▲0.9434.92 ▼1.30
Add New Post /wp-admin/post-new.php1,538 ▲1223.25 ▲0.38665.78 ▲36.2056.73 ▲5.27
Media Library /wp-admin/upload.php1,411 ▲114.43 ▲0.23103.27 ▼7.7345.55 ▼1.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPMediaCounts\\plugin_dir_path() in wp-content/plugins/media-count/wp-media-count.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Screenshot #4 (Audio Files Count) image not found
You can look at the official readme.txt

media-count/wp-media-count.php 85% from 13 tests

The main PHP script in "Media Count" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("media-count.php" instead of "wp-media-count.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 147 characters long)

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 plugin604 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25637547
CSS11357

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.02
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions32100.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