10% ry-toolkit

Code Review | RY Toolkit

WordPress plugin RY Toolkit scored10%from 54 tests.

About plugin

  • Plugin page: ry-toolkit
  • Plugin version: 1.2.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2023
  • Latest release: Nov 15, 2023
  • Number of updates: 39
  • Update frequency: every 6.1 days
  • Top authors: fantasyworld (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /880 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Error in wp-content/plugins/ry-toolkit/class.main.php+83
    Uncaught TypeError: Return value of RY_Toolkit::get_option() must be an instance of mixed, bool returned in wp-content/plugins/ry-toolkit/class.main.php:83
    Stack trace:
    #0 wp-content/plugins/ry-toolkit/includes/update.php(7): RY_Toolkit::get_option()
    #1 wp-content/plugins/ry-toolkit/class.main.php(37): RY_Toolkit_Update::update()
    #2 wp-content/plugins/ry-toolkit/class.main.php(15): RY_Toolkit->do_init()
    #3 wp-content/plugins/ry-toolkit/ry-toolkit.php(27): RY_Toolkit::instance()
    #4 wp-content/plugins/ry-toolkit/ry-toolkit.php(30): RY_Toolkit()
    #5 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #6 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.85ms] Passed 4 tests

This is a short check of server-side resources used by RY Toolkit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.74 ▼6.52
Dashboard /wp-admin3.31 ▲0.0042.84 ▼8.72
Posts /wp-admin/edit.php3.36 ▲0.0044.30 ▼1.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.68 ▼14.52
Media Library /wp-admin/upload.php3.23 ▲0.0038.15 ▲5.70

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

RY Toolkit: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.34 ▲0.001.66 ▼0.2245.44 ▲0.97
Dashboard /wp-admin2,195 ▲215.60 ▼0.0185.83 ▼15.6239.61 ▲2.21
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0440.28 ▼1.0536.42 ▼3.39
Add New Post /wp-admin/post-new.php1,526 ▼023.44 ▲0.26681.77 ▲26.0347.62 ▼27.26
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.05110.38 ▲3.4649.62 ▲5.29

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ry-toolkit/admin/page/html/options-nav.php
    • > /wp-content/plugins/ry-toolkit/ry-toolkit.php
  • 21× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RY_Toolkit_Admin_Page' not found in wp-content/plugins/ry-toolkit/admin/page/options.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/ry-toolkit/admin/includes/cron-event-list-table.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_sitemap_providers() in wp-content/plugins/ry-toolkit/admin/page/html/options-sitemap.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_sitemap_providers() in wp-content/plugins/ry-toolkit/admin/page/html/options-wp-rocket.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ry-toolkit/admin/html/media/big-size.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ry-toolkit/admin/html/media/disable-subsize.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/ry-toolkit/admin/html/action_form.php:1
    • > PHP Fatal error
      Uncaught Error: Call to a member function views() on null in wp-content/plugins/ry-toolkit/admin/page/html/cron-event.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ry-toolkit/admin/page/html/tools.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ry-toolkit/admin/page/html/options-frontend.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: tool

ry-toolkit/ry-toolkit.php 92% from 13 tests

"RY Toolkit" version 1.2.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("6.0" instead of "5.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin2,636 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP31370372,145
PO File1167202396
JavaScript22048
CSS29047

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity11.06
▷ Minimum class complexity3.00
▷ Maximum class complexity39.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes15.88%
▷ Concrete classes1694.12%
▷ Final classes425.00%
Methods117
▷ Static methods3025.64%
▷ Public methods7866.67%
▷ Protected methods3429.06%
▷ Private methods54.27%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin