10% sukellos-image-formats

Code Review | Sukellos Image Formats

WordPress plugin Sukellos Image Formats scored10%from 54 tests.

About plugin

  • Plugin page: sukellos-image-fo...
  • Plugin version: 1.1.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.0
  • WordPress version: 6.3.1
  • First release: Mar 30, 2022
  • Latest release: Aug 17, 2023
  • Number of updates: 20
  • Update frequency: every 25.3 days
  • Top authors: sukellos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /457 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.75MB] [CPU: ▼49.90ms] Passed 4 tests

A check of server-side resources used by Sukellos Image Formats
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.24 ▼1.226.47 ▼31.91
Dashboard /wp-admin2.26 ▼1.087.92 ▼54.78
Posts /wp-admin/edit.php2.26 ▼1.097.09 ▼36.67
Add New Post /wp-admin/post-new.php2.26 ▼3.628.05 ▼76.24
Media Library /wp-admin/upload.php2.26 ▼0.969.18 ▼23.63
Tools /wp-admin/admin.php?page=wp_sukellos_fw_tools2.266.44
Sukellos Fw /wp-admin/admin.php?page=wp_sukellos_fw_dashboard2.267.75

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Sukellos Image Formats
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲23214.76 ▲0.461.66 ▼0.1037.69 ▼6.47
Dashboard /wp-admin2,385 ▲2006.47 ▲1.61137.53 ▲20.8143.93 ▼2.04
Posts /wp-admin/edit.php2,288 ▲2023.42 ▲1.3853.98 ▲18.7632.71 ▼1.67
Add New Post /wp-admin/post-new.php1,549 ▲1123.25 ▲0.07566.05 ▼122.6534.22 ▼21.09
Media Library /wp-admin/upload.php1,427 ▲424.15 ▼0.0782.95 ▼32.2342.44 ▼3.92
Tools /wp-admin/admin.php?page=wp_sukellos_fw_tools1,0883.2839.4231.02
Sukellos Fw /wp-admin/admin.php?page=wp_sukellos_fw_dashboard1,2823.1643.2443.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • wp_sukellos_fw_edd_licenses
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_sukellos_fw_dashboard
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

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
Almost there! Just fix the following items
  • 96× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Processor\\MemoryProcessor' not found in wp-content/plugins/sukellos-image-formats/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Handler\\HandlerInterface' not found in wp-content/plugins/sukellos-image-formats/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractSyslogHandler' not found in wp-content/plugins/sukellos-image-formats/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\Handler' not found in wp-content/plugins/sukellos-image-formats/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/sukellos-image-formats/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/sukellos-image-formats/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/sukellos-image-formats/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/sukellos-image-formats/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/sukellos-image-formats/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/sukellos-image-formats/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: user meta, post meta, option, admin, admin builder...

sukellos-image-formats/sukellos-image-formats.php 77% from 13 tests

The main file in "Sukellos Image Formats" v. 1.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires PHP: Required version must match the one declared in readme.txt ("7.0" instead of "7.2")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder does not exist ("/languages")

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
There were no executable files found in this plugin16,733 lines of code in 301 files:
LanguageFilesBlank linesComment linesLines of code
PHP1944,4869,92012,720
JavaScript862995072,426
CSS1344103716
Markdown41920604
JSON400267

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.53
▷ Minimum class complexity1.00
▷ Maximum class complexity84.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces22
Interfaces13
Traits10
Classes163
▷ Abstract classes2716.56%
▷ Concrete classes13683.44%
▷ Final classes32.21%
Methods1,127
▷ Static methods1049.23%
▷ Public methods81272.05%
▷ Protected methods23220.59%
▷ Private methods837.36%
Functions23
▷ Named functions14.35%
▷ Anonymous functions2295.65%
Constants137
▷ Global constants00.00%
▷ Class constants137100.00%
▷ Public constants11583.94%

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
1 compressed PNG file occupies 0.10MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png106.49KB106.45KB0.04%