10% sukellos-enable-classic-editor

Code Review | Sukellos Enable Classic Editor

WordPress plugin Sukellos Enable Classic Editor scored10%from 54 tests.

About plugin

  • Plugin page: sukellos-enable-c...
  • 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: Apr 5, 2022
  • Latest release: Aug 17, 2023
  • Number of updates: 14
  • Update frequency: every 35.7 days
  • Top authors: sukellos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /444 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > 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: ▼56.54ms] Passed 4 tests

A check of server-side resources used by Sukellos Enable Classic Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.24 ▼1.226.97 ▼32.89
Dashboard /wp-admin2.26 ▼1.087.44 ▼55.30
Posts /wp-admin/edit.php2.27 ▼1.099.32 ▼41.43
Add New Post /wp-admin/post-new.php2.26 ▼3.627.46 ▼96.53
Media Library /wp-admin/upload.php2.26 ▼0.968.00 ▼27.92
Tools /wp-admin/admin.php?page=wp_sukellos_fw_tools2.277.43
Sukellos Fw /wp-admin/admin.php?page=wp_sukellos_fw_dashboard2.276.69

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 324 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Sukellos Enable Classic Editor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲20414.78 ▲0.431.78 ▲0.2942.42 ▼0.34
Dashboard /wp-admin2,369 ▲1956.19 ▲0.67119.51 ▲27.5438.53 ▼5.95
Posts /wp-admin/edit.php2,297 ▲1973.31 ▲1.3155.77 ▲17.8237.53 ▲1.49
Add New Post /wp-admin/post-new.php1,559 ▲3122.92 ▼0.20641.71 ▼40.4936.94 ▼17.51
Media Library /wp-admin/upload.php1,431 ▲314.10 ▼0.1282.06 ▼28.1648.50 ▲1.20
Tools /wp-admin/admin.php?page=wp_sukellos_fw_tools1,0473.1238.1130.34
Sukellos Fw /wp-admin/admin.php?page=wp_sukellos_fw_dashboard1,2923.2641.7239.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > 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.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • wp_sukellos_fw_edd_licenses
    • widget_recent-comments
    • db_upgraded

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)
These server-side errors were triggered
  • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 96× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\MailHandler' not found in wp-content/plugins/sukellos-enable-classic-editor/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/sukellos-enable-classic-editor/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\MailHandler' not found in wp-content/plugins/sukellos-enable-classic-editor/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/sukellos-enable-classic-editor/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/sukellos-enable-classic-editor/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-enable-classic-editor/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php:34
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/sukellos-enable-classic-editor/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/sukellos-enable-classic-editor/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/sukellos-enable-classic-editor/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/sukellos-enable-classic-editor/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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
9 plugin tags: user meta, post meta, gutenberg, custom admin panel, option...

sukellos-enable-classic-editor/sukellos-enable-classic-editor.php 77% from 13 tests

The main PHP file in "Sukellos Enable Classic Editor" ver. 1.1.6 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Requires PHP: Required version must match the one declared in readme.txt ("7.0" instead of "7.2")

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 plugin16,787 lines of code in 301 files:
LanguageFilesBlank linesComment linesLines of code
PHP1944,5099,93012,774
JavaScript862995072,426
CSS1344103716
Markdown41920604
JSON400267

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.57
▷ 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%
Constants136
▷ Global constants00.00%
▷ Class constants136100.00%
▷ Public constants11483.82%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.59MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png449.22KB114.46KB▼ 74.52%
assets/screenshot-2.png59.06KB59.06KB0.00%
assets/screenshot-3.png90.83KB90.82KB0.01%