78% wp-imgur-extra

Code Review | wp-imgur-extra

WordPress plugin wp-imgur-extra scored78%from 54 tests.

About plugin

  • Plugin page: wp-imgur-extra
  • Plugin version: 0.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2016
  • Latest release: Jun 1, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: fikrizaman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,223 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.62MB] [CPU: ▼0.89ms] Passed 4 tests

An overview of server-side resources used by wp-imgur-extra
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5240.94 ▼0.16
Dashboard /wp-admin3.96 ▲0.6251.94 ▼14.19
Posts /wp-admin/edit.php4.08 ▲0.7254.53 ▲7.37
Add New Post /wp-admin/post-new.php6.54 ▲0.66100.53 ▲5.73
Media Library /wp-admin/upload.php3.89 ▲0.6638.75 ▲5.06
WP Imgur Extra /wp-admin/options-general.php?page=wp-imgur-extra3.8936.20

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for wp-imgur-extra
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.16 ▼1.061.66 ▼0.1640.63 ▼3.01
Dashboard /wp-admin2,210 ▲224.87 ▼0.01108.92 ▼8.5742.13 ▼1.83
Posts /wp-admin/edit.php2,093 ▲41.96 ▼0.0939.36 ▲2.7535.76 ▼0.20
Add New Post /wp-admin/post-new.php1,545 ▲2818.39 ▲0.84604.57 ▼54.8951.14 ▼2.93
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0494.95 ▼2.5141.38 ▼3.39
WP Imgur Extra /wp-admin/options-general.php?page=wp-imgur-extra7923.1161.6026.74

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 184× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Arrow\\Plugin' not found in wp-content/plugins/wp-imgur-extra/lib/WpImgurExtra/Plugin.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Call' not found in wp-content/plugins/wp-imgur-extra/vendor/twig/twig/lib/Twig/Node/Expression/Test.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Transport' not found in wp-content/plugins/wp-imgur-extra/vendor/rmccue/requests/library/Requests/Transport/cURL.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/wp-imgur-extra/vendor/twig/twig/lib/Twig/TokenParser/Import.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression' not found in wp-content/plugins/wp-imgur-extra/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/wp-imgur-extra/vendor/twig/twig/lib/Twig/TokenParser/Include.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/wp-imgur-extra/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_CompilerInterface' not found in wp-content/plugins/wp-imgur-extra/vendor/twig/twig/lib/Twig/Compiler.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/wp-imgur-extra/vendor/rmccue/requests/library/Requests/Exception/HTTP/511.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Arrow\\Ajax\\Controller' not found in wp-content/plugins/wp-imgur-extra/lib/WpImgurExtra/Ajax/ImageController.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=wp-imgur-extra
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-imgur-extra/js/wp-imgur-extra-vendor.js?ver=1696734448 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-extra
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-imgur-extra/js/wp-imgur-extra-vendor.js?ver=1696734448 41:12 Uncaught Error: Could not find module ember

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Plugin setting page) image missing
The official readme.txt might help

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

"wp-imgur-extra" version 0.7.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
96 characters long description:
This plugin based on wp-imgur by Darshan Sawardekar with added option to enable https for image.

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 detected39,169 lines of code in 313 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript510,25518,27323,232
PHP2953,6207,79915,292
JSON100349
CSS2450174
YAML8263107
HTML10010
Markdown1205

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.41
▷ 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png82.46KB23.26KB▼ 71.79%
images/detector.png3.91KB2.31KB▼ 40.91%