84% toocheke-companion

Code Review | Toocheke Companion

WordPress plugin Toocheke Companion scored84%from 54 tests.

About plugin

  • Plugin page: toocheke-companion
  • Plugin version: 1.127
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: May 21, 2019
  • Latest release: Nov 20, 2023
  • Number of updates: 147
  • Update frequency: every 11.2 days
  • Top authors: toocheke (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

900+ active /40,464 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
Install script ran successfully

Server metrics [RAM: ▲1.30MB] [CPU: ▲3.69ms] Passed 4 tests

An overview of server-side resources used by Toocheke Companion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.71 ▲1.2445.41 ▲1.99
Dashboard /wp-admin4.66 ▲1.3158.96 ▼4.86
Posts /wp-admin/edit.php4.73 ▲1.3764.35 ▲15.75
Add New Post /wp-admin/post-new.php7.26 ▲1.3794.69 ▲1.86
Media Library /wp-admin/upload.php4.50 ▲1.2752.05 ▲16.94
Import /wp-admin/admin.php?page=toocheke-import4.5047.11
All Comics /wp-admin/edit.php?post_type=comic4.5953.70
Comic Locations /wp-admin/edit-tags.php?taxonomy=comic_locations&post_type=comic4.5348.98
Dashboard /wp-admin/admin.php?page=toocheke-menu4.5048.21
All Series /wp-admin/edit.php?post_type=series4.5855.77
Comic Characters /wp-admin/edit-tags.php?taxonomy=comic_characters&post_type=comic4.5351.04
Options /wp-admin/admin.php?page=toocheke-options-page4.5046.36
Comic Chapters /wp-admin/edit-tags.php?taxonomy=chapters&post_type=comic4.5349.05
Series Tags /wp-admin/edit-tags.php?taxonomy=series_tags&post_type=series4.5343.18
Series Genres /wp-admin/edit-tags.php?taxonomy=genres&post_type=series4.5351.81

Server storage [IO: ▲3.38MB] [DB: ▲0.01MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Toocheke Companion
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,150 ▲37815.04 ▲0.336.23 ▲4.3038.80 ▼5.90
Dashboard /wp-admin2,433 ▲2536.42 ▲0.77122.13 ▲22.5443.08 ▼3.26
Posts /wp-admin/edit.php2,358 ▲2583.53 ▲1.5759.90 ▲19.9035.54 ▲3.03
Add New Post /wp-admin/post-new.php1,603 ▲7722.95 ▲0.13628.66 ▼12.6135.82 ▼13.14
Media Library /wp-admin/upload.php1,501 ▲984.34 ▲0.2084.19 ▼11.2742.63 ▲0.89
Import /wp-admin/admin.php?page=toocheke-import1,1173.4244.8628.37
All Comics /wp-admin/edit.php?post_type=comic1,4833.6655.0834.11
Comic Locations /wp-admin/edit-tags.php?taxonomy=comic_locations&post_type=comic1,5443.4443.2029.39
Dashboard /wp-admin/admin.php?page=toocheke-menu1,0813.2242.2470.82
All Series /wp-admin/edit.php?post_type=series1,4383.4852.6730.13
Comic Characters /wp-admin/edit-tags.php?taxonomy=comic_characters&post_type=comic1,6413.3747.2632.32
Options /wp-admin/admin.php?page=toocheke-options-page1,1123.3940.9228.40
Comic Chapters /wp-admin/edit-tags.php?taxonomy=chapters&post_type=comic1,6693.3649.8536.16
Series Tags /wp-admin/edit-tags.php?taxonomy=series_tags&post_type=series1,5353.3552.1732.15
Series Genres /wp-admin/edit-tags.php?taxonomy=genres&post_type=series1,6243.3549.0731.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 25× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Toocheke_Companion_Comic_Features' not found in wp-content/plugins/toocheke-companion/templates/content-comicblogpost.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/toocheke-companion/templates/content-toptencomics.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/toocheke-companion/templates/content-comicarchive.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_categories() in wp-content/plugins/toocheke-companion/templates/content-characters.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/toocheke-companion/toocheke-companion-import.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/toocheke-companion/inc/toocheke-companion-import.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/toocheke-companion/templates/content-comicarchivegallery.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/toocheke-companion/toocheke-companion.php:5720
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/toocheke-companion/templates/content-allchapters.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/toocheke-companion/templates/content-chaptersnavigation.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: companion, comic, cartoon, webtoon, toocheke...

toocheke-companion/toocheke-companion.php 92% from 13 tests

The primary PHP file in "Toocheke Companion" version 1.127 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected24,216 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
SVG40128,894
CSS173,6321068,387
PHP268921,0426,521
JavaScript77637414

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity185.67
▷ Minimum class complexity1.00
▷ Maximum class complexity548.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods292
▷ Static methods00.00%
▷ Public methods28898.63%
▷ Protected methods41.37%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/ToochekeWPAdminDashboardHero.png5.25KB2.51KB▼ 52.30%
img/no-image.png13.95KB6.68KB▼ 52.14%
img/default-thumbnail-image.png6.13KB3.86KB▼ 36.99%