88% wp-editor-imgur-button

Code Review | WP Editor Imgur Button

WordPress plugin WP Editor Imgur Button scored 88% from 54 tests.

About plugin

  • Plugin page: wp-editor-imgur-b...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.5.3
  • WordPress version: 5.8.1
  • First release: Jul 25, 2016
  • Latest release: Aug 2, 2016
  • Number of updates: 31
  • Update frequency: every 0.3 days
  • Top authors: codehay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,067 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼141.50ms] Passed 4 tests

A check of server-side resources used by WP Editor Imgur Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1437.91 ▲14.58
Dashboard /wp-admin3.09 ▲0.0445.48 ▲2.80
Posts /wp-admin/edit.php3.15 ▲0.0442.27 ▼6.29
Add New Post /wp-admin/post-new.php5.45 ▲0.0290.45 ▼560.44
Media Library /wp-admin/upload.php3.03 ▲0.0332.18 ▼2.05
Imgur Uploader Settings /wp-admin/options-general.php?page=imgur-uploader3.0031.09

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Editor Imgur Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,834 ▲23816.29 ▲0.6512.80 ▲2.8447.30 ▲1.75
Dashboard /wp-admin2,987 ▲566.19 ▲0.15142.27 ▼6.75113.32 ▲4.85
Posts /wp-admin/edit.php2,753 ▲142.72 ▲0.0172.38 ▲1.6986.93 ▼4.66
Add New Post /wp-admin/post-new.php1,510 ▼2,21618.60 ▲3.37373.30 ▼98.77105.22 ▲1.77
Media Library /wp-admin/upload.php1,821 ▲175.29 ▲0.29174.30 ▲20.89116.16 ▲4.35
Imgur Uploader Settings /wp-admin/options-general.php?page=imgur-uploader1,1822.3452.7761.51

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 2× 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/wp-editor-imgur-button/option-file.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-editor-imgur-button/option-file.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=imgur-uploader
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-editor-imgur-button/js/ajax-action.js?ver=5.8.1 0:20 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: imgur plugin, imgur, front end upload, imgur comment, imgur uploader...

wp-editor-imgur-button/imgur-upload.php 92% from 13 tests

Analyzing the main PHP file in "WP Editor Imgur Button" version 1.1
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-editor-imgur-button.php" instead of "imgur-upload.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin214 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP21912152
JavaScript21040
CSS12022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin