84% cryout-themeswitch

Code Review | Cryout Theme Switch

WordPress plugin Cryout Theme Switch scored84%from 54 tests.

About plugin

  • Plugin page: cryout-themeswitch
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Oct 4, 2016
  • Latest release: Apr 28, 2023
  • Number of updates: 19
  • Update frequency: every 126.4 days
  • Top authors: Cryout Creations (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,358 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▲2.19ms] Passed 4 tests

This is a short check of server-side resources used by Cryout Theme Switch
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.89 ▲5.34
Dashboard /wp-admin3.37 ▲0.0647.85 ▲1.26
Posts /wp-admin/edit.php3.42 ▲0.0649.19 ▲3.14
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.07 ▲2.78
Media Library /wp-admin/upload.php3.29 ▲0.0636.75 ▲1.59
Cryout ThemeSwitch /wp-admin/tools.php?page=cryout-themeswitch3.2641.97

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Cryout Theme Switch
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,072 ▲30113.63 ▼0.797.11 ▲5.4842.17 ▼0.95
Dashboard /wp-admin2,292 ▲1014.91 ▲0.00112.39 ▲7.6737.73 ▼4.75
Posts /wp-admin/edit.php2,175 ▲892.05 ▼0.0140.24 ▲5.1934.20 ▲3.87
Add New Post /wp-admin/post-new.php1,576 ▲2922.92 ▲4.67655.97 ▲33.6255.04 ▼1.39
Media Library /wp-admin/upload.php1,474 ▲864.27 ▲0.12106.00 ▲8.8246.22 ▲3.42
Cryout ThemeSwitch /wp-admin/tools.php?page=cryout-themeswitch9861.7228.9730.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cryout-themeswitch/cryout-themeswitch.php:510

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: switch, admin, theme, swap

cryout-themeswitch/cryout-themeswitch.php 92% from 13 tests

This is the main PHP file of "Cryout Theme Switch" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin447 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP110288322
CSS111763
JavaScript1211162

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1482.35%
▷ Protected methods00.00%
▷ Private methods317.65%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin