79% wp-imgur

Code Review | wp-imgur

WordPress plugin wp-imgur scored 79% from 54 tests.

About plugin

  • Plugin page: wp-imgur
  • Plugin version: 0.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-3.9.2
  • WordPress version: 6.3.1
  • First release: Aug 7, 2014
  • Latest release: Aug 7, 2014
  • Number of updates: 11
  • Update frequency: every 3.3 days
  • Top authors: dsawardekar (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active / 3,847 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.62MB] [CPU: ▼2.39ms] Passed 4 tests

This is a short check of server-side resources used by wp-imgur
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5139.07 ▼2.42
Dashboard /wp-admin3.96 ▲0.6648.19 ▼1.57
Posts /wp-admin/edit.php4.07 ▲0.7251.71 ▼0.83
Add New Post /wp-admin/post-new.php6.54 ▲0.6689.69 ▼4.74
Media Library /wp-admin/upload.php3.88 ▲0.6640.27 ▲2.47
WP Imgur /wp-admin/options-general.php?page=wp-imgur3.8935.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for wp-imgur
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.55 ▼0.631.80 ▲0.0237.14 ▼6.96
Dashboard /wp-admin2,210 ▲554.84 ▼0.86107.32 ▲7.8436.66 ▼4.01
Posts /wp-admin/edit.php2,093 ▲182.03 ▲0.0539.96 ▲0.6736.00 ▲3.59
Add New Post /wp-admin/post-new.php1,537 ▲2323.28 ▲5.73671.39 ▼5.2254.54 ▼4.81
Media Library /wp-admin/upload.php1,392 ▲74.20 ▼0.02104.03 ▼0.2244.38 ▼3.55
WP Imgur /wp-admin/options-general.php?page=wp-imgur7743.1263.0028.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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 items
  • 184× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Call' not found in wp-content/plugins/wp-imgur/vendor/twig/twig/lib/Twig/Node/Expression/Test.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/wp-imgur/vendor/rmccue/requests/library/Requests/Exception/HTTP/418.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression' not found in wp-content/plugins/wp-imgur/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/wp-imgur/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression' not found in wp-content/plugins/wp-imgur/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression' not found in wp-content/plugins/wp-imgur/vendor/twig/twig/lib/Twig/Node/Expression/Array.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/wp-imgur/vendor/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/wp-imgur/vendor/twig/twig/lib/Twig/TokenParser/From.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Arrow\\Plugin' not found in wp-content/plugins/wp-imgur/lib/WpImgur/Plugin.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/wp-imgur/vendor/twig/twig/lib/Twig/TokenParser/Block.php:23

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=wp-imgur
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-imgur/js/wp-imgur-vendor.js?ver=1696232794 2914:4 Uncaught Ember.Error: Assertion Failed: Ember Views require jQuery between 1.7 and 2.1
    • > GET request to /wp-admin/options-general.php?page=wp-imgur
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-imgur/js/wp-imgur-vendor.js?ver=1696232794 41:12 Uncaught Error: Could not find module ember

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: cdn, image cdn, imgur

wp-imgur/wp-imgur.php Passed 13 tests

This is the main PHP file of "wp-imgur" version 0.7.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
41 characters long description:
Serves your Media Library from imgur.com.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin38,989 lines of code in 314 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript510,25218,27323,215
PHP2953,6147,79915,110
JSON100349
CSS2450174
YAML9323126
HTML10010
Markdown1205

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.40
▷ Minimum class complexity1.00
▷ Maximum class complexity193.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces14
Interfaces24
Traits0
Classes267
▷ Abstract classes103.75%
▷ Concrete classes25796.25%
▷ Final classes00.00%
Methods1,471
▷ Static methods634.28%
▷ Public methods1,32490.01%
▷ Protected methods1439.72%
▷ Private methods40.27%
Functions52
▷ Named functions5198.08%
▷ Anonymous functions11.92%
Constants53
▷ Global constants11.89%
▷ Class constants5298.11%
▷ Public constants52100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/detector.png3.91KB2.31KB▼ 40.91%