94% list-media

Code Review | List Media

WordPress plugin List Media scored 94% from 54 tests.

About plugin

  • Plugin page: list-media
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.1
  • WordPress version: 5.8.1
  • First release: Mar 1, 2016
  • Latest release: May 22, 2020
  • Number of updates: 7
  • Update frequency: every 220.4 days
  • Top authors: GeroNikolov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,000 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Analyzing server-side resources used by List Media
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1237.23 ▲14.71
Dashboard /wp-admin3.07 ▲0.0156.57 ▲5.76
Posts /wp-admin/edit.php3.12 ▲0.0142.33 ▼3.65
Add New Post /wp-admin/post-new.php5.43 ▲0.0096.96 ▼562.07
Media Library /wp-admin/upload.php3.01 ▲0.0035.13 ▼11.46

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for List Media
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.98 ▲0.477.07 ▼2.0447.29 ▼6.01
Dashboard /wp-admin2,973 ▲395.88 ▼0.24146.71 ▼12.79120.46 ▲7.00
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0165.41 ▼0.8892.52 ▼9.54
Add New Post /wp-admin/post-new.php1,591 ▼2418.83 ▼2.26385.29 ▲93.83116.59 ▲2.02
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.03169.00 ▲14.71128.29 ▲1.89

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/list-media/list-media.php:150

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === list-media === )
The official readme.txt is a good inspiration

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

The main file in "List Media" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
73 characters long description:
This plugin gives you the possibility to list all of your Media files. :)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin124 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21514124

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity5.00
▷ Minimum method complexity5.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected