78% wp-splashing-images

Code Review | Splashing Images

WordPress plugin Splashing Images scored 78% from 54 tests.

About plugin

  • Plugin page: wp-splashing-images
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.2
  • WordPress version: 6.3.1
  • First release: Nov 1, 2016
  • Latest release: Nov 5, 2018
  • Number of updates: 16
  • Update frequency: every 45.8 days
  • Top authors: janhenckens (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

A check of server-side resources used by Splashing Images
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.55 ▼11.68
Dashboard /wp-admin3.33 ▲0.0243.14 ▼2.28
Posts /wp-admin/edit.php3.38 ▲0.0246.23 ▲3.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.60 ▼8.55
Media Library /wp-admin/upload.php3.25 ▲0.0232.61 ▼0.68
Splashing Images /wp-admin/upload.php?page=wp-splashing3.2928.94

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 369 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
recovery_mode_email_last_sent
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Splashing Images
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.32 ▼0.901.58 ▼0.3540.92 ▼6.14
Dashboard /wp-admin2,223 ▲324.98 ▼0.06111.20 ▲9.7340.25 ▼2.61
Posts /wp-admin/edit.php2,106 ▲172.12 ▲0.1136.59 ▲2.3031.28 ▼3.35
Add New Post /wp-admin/post-new.php1,530 ▼1223.34 ▲5.08666.60 ▲46.8738.26 ▼28.82
Media Library /wp-admin/upload.php1,405 ▲174.26 ▲0.0994.95 ▼9.7241.98 ▼1.43
Splashing Images /wp-admin/upload.php?page=wp-splashing7191.578.2942.95

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/upload.php?page=wp-splashing
    • > Notice in wp-content/plugins/wp-splashing-images/admin/partials/wp-splashing-admin-main.php+37
    Undefined index: mode
    • > GET request to /wp-admin/upload.php?page=wp-splashing
    • > Notice in wp-content/plugins/wp-splashing-images/admin/partials/wp-splashing-admin-main.php+36
    Undefined index: search
    • > GET request to /wp-admin/upload.php?page=wp-splashing
    • > Error in wp-content/plugins/wp-splashing-images/vendor/crewlabs/unsplash/src/Endpoint.php+87
    Uncaught Crew\Unsplash\Exception: ["Couldn't find Photo"] in wp-content/plugins/wp-splashing-images/vendor/crewlabs/unsplash/src/Endpoint.php:87
    Stack trace:
    #0 wp-content/plugins/wp-splashing-images/vendor/crewlabs/unsplash/src/Photo.php(61): Crew\Unsplash\Endpoint::__callStatic()
    #1 wp-content/plugins/wp-splashing-images/admin/class-wp-splashing-unsplash.php(122): Crew\Unsplash\Photo::curated()
    #2 wp-content/plugins/wp-splashing-images/admin/partials/wp-splashing-admin-main.php(68): Wp_Splashing_Unsplash->getLastFeatured()
    #3 wp-content/plugins/wp-splashing-images/admin/class-wp-splashing-admin.php(93): require('/var/www/wordpr...')
    #4 wp-includes/class-wp-hook.php(310): Wp_Splashing_Admin->wp_splashing_settings_page()
    #5 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #6 wp-includes/plugin.php(517): WP_Hook->do_action()
    #7 wp

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
  • 171× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RandomLib\\AbstractMixer' not found in wp-content/plugins/wp-splashing-images/vendor/ircmaxell/random-lib/lib/RandomLib/Mixer/Hash.php:51
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/wp-splashing-images/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-splashing-images/vendor/guzzlehttp/psr7/tests/BufferStreamTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'SecurityLib\\AbstractFactory' not found in wp-content/plugins/wp-splashing-images/vendor/ircmaxell/random-lib/lib/RandomLib/Factory.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'RandomLib\\AbstractSource' not found in wp-content/plugins/wp-splashing-images/vendor/ircmaxell/random-lib/lib/RandomLib/Source/RandomBytes.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'RandomLib\\AbstractMixer' not found in wp-content/plugins/wp-splashing-images/vendor/ircmaxell/random-lib/lib/RandomLib/Mixer/XorMixer.php:50
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/wp-splashing-images/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'RandomLib\\AbstractSource' not found in wp-content/plugins/wp-splashing-images/vendor/ircmaxell/random-lib/lib/RandomLib/Source/OpenSSL.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'Crew\\Unsplash\\Endpoint' not found in wp-content/plugins/wp-splashing-images/vendor/crewlabs/unsplash/src/Category.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-splashing-images/vendor/guzzlehttp/psr7/tests/ResponseTest.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === wp-splashing-images === )
The official readme.txt might help

wp-splashing-images/wp-splashing-images.php 92% from 13 tests

Analyzing the main PHP file in "Splashing Images" version 2.1.3
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin28,717 lines of code in 330 files:
LanguageFilesBlank linesComment linesLines of code
PHP2643,87410,75219,417
Markdown211,57904,393
YAML162203,454
JSON1320868
JavaScript51420191
PO File14458151
XML500108
CSS110485
make320047
Bourne Shell1203

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.51
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces34
Interfaces17
Traits7
Classes215
▷ Abstract classes115.12%
▷ Concrete classes20494.88%
▷ Final classes83.92%
Methods1,708
▷ Static methods17410.19%
▷ Public methods1,46785.89%
▷ Protected methods1096.38%
▷ Private methods1327.73%
Functions400
▷ Named functions6917.25%
▷ Anonymous functions33182.75%
Constants94
▷ Global constants55.32%
▷ Class constants8994.68%
▷ Public constants89100.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