90% wp-media-size

Code Review | WP Media Size

WordPress plugin WP Media Size scored 90% from 54 tests.

About plugin

  • Plugin page: wp-media-size
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 6, 2017
  • Latest release: Apr 7, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: mrpritchett (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 804 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by WP Media Size
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.31 ▼8.44
Dashboard /wp-admin3.31 ▲0.0149.51 ▲3.48
Posts /wp-admin/edit.php3.36 ▲0.0047.80 ▲2.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.57 ▼6.87
Media Library /wp-admin/upload.php3.23 ▲0.0036.05 ▲4.09

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Media Size
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.18 ▼1.451.69 ▼0.3443.05 ▼5.20
Dashboard /wp-admin2,209 ▲215.88 ▲1.00100.31 ▼2.1338.33 ▼8.05
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0338.65 ▲2.2635.38 ▲0.93
Add New Post /wp-admin/post-new.php1,542 ▲1718.31 ▼4.53592.78 ▼49.1951.60 ▲3.46
Media Library /wp-admin/upload.php1,407 ▲224.21 ▲0.0199.19 ▲0.9142.47 ▼2.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: files, filesize, file size, media size, images...

wp-media-size/wp-media-size.php 92% from 13 tests

"WP Media Size" version 0.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

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
Good job! No executable or dangerous file extensions detected19 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP252619

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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 images were found in this plugin