84% mooontes-comments-media-upload

Code Review | mooontes Comments Media Upload

WordPress plugin mooontes Comments Media Upload scored84%from 54 tests.

About plugin

  • Plugin page: mooontes-comments...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Jan 14, 2013
  • Latest release: Jan 28, 2013
  • Number of updates: 3
  • Update frequency: every 15.3 days
  • Top authors: mooontes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,029 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.59ms] Passed 4 tests

This is a short check of server-side resources used by mooontes Comments Media Upload
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.05 ▼3.07
Dashboard /wp-admin3.33 ▲0.0249.07 ▼3.60
Posts /wp-admin/edit.php3.38 ▲0.0255.03 ▲2.88
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.94 ▼18.57
Media Library /wp-admin/upload.php3.25 ▲0.0239.40 ▲3.53

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for mooontes Comments Media Upload
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲13413.44 ▼0.8410.06 ▲8.4541.70 ▼8.14
Dashboard /wp-admin2,195 ▲155.54 ▼0.0989.45 ▼0.1738.63 ▼7.95
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0941.19 ▼3.1937.62 ▼2.11
Add New Post /wp-admin/post-new.php1,526 ▼023.39 ▲0.25627.57 ▼76.3059.21 ▼3.77
Media Library /wp-admin/upload.php1,400 ▼34.25 ▲0.09104.37 ▲1.9342.91 ▲0.07

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mooontes-comments-media-upload/mooontes-comments-media-upload.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: A description for screenshot #3 is required in mooontes-comments-media-upload/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === mooontes-comments-media-upload === )
You can take inspiration from this readme.txt

mooontes-comments-media-upload/mooontes-comments-media-upload.php Passed 13 tests

The main file in "mooontes Comments Media Upload" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
35 characters long description:
Allows media upload within comments

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 plugin82 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1231075
JavaScript1007

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods116.67%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.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