83% mstoic-enable-contributor-media-uploads

Code Review | Contributors Media Upload by Mstoic

WordPress plugin Contributors Media Upload by Mstoic scored83%from 54 tests.

About plugin

  • Plugin page: mstoic-enable-con...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Jul 8, 2016
  • Latest release: Sep 22, 2016
  • Number of updates: 5
  • Update frequency: every 16.6 days
  • Top authors: mstoic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,015 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Contributors Media Upload by Mstoic
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0137.02 ▼1.15
Dashboard /wp-admin3.31 ▲0.0048.83 ▼4.48
Posts /wp-admin/edit.php3.36 ▲0.0047.63 ▲3.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.34 ▼6.68
Media Library /wp-admin/upload.php3.23 ▲0.0034.25 ▲2.67

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Contributors Media Upload by Mstoic
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.34 ▼1.031.62 ▼0.2839.46 ▼6.07
Dashboard /wp-admin2,206 ▲215.82 ▼0.08100.76 ▼2.9438.09 ▼6.78
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0639.42 ▲0.8437.23 ▲6.01
Add New Post /wp-admin/post-new.php1,523 ▲923.30 ▲5.67615.83 ▼31.2448.56 ▼3.18
Media Library /wp-admin/upload.php1,388 ▲34.32 ▲0.0793.68 ▼1.8840.56 ▲0.20

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 were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mstoic-enable-contributor-media-uploads/mstoic-media-upload-contributors.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === mstoic-enable-contributor-media-uploads === )
You can take inspiration from this readme.txt

mstoic-enable-contributor-media-uploads/mstoic-media-upload-contributors.php 85% from 13 tests

This is the main PHP file of "Contributors Media Upload by Mstoic" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mstoic-enable-contributor-media-uploads.php" instead of "mstoic-media-upload-contributors.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 plugin10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP172810

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin