83% simple-theme-changer

Code Review | Simple Theme Changer

WordPress plugin Simple Theme Changer scored83%from 54 tests.

About plugin

  • Plugin page: simple-theme-changer
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 1, 2020
  • Latest release: Dec 1, 2020
  • Number of updates: 20
  • Update frequency: every 0.1 days
  • Top authors: darendev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /366 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.38ms] Passed 4 tests

Analyzing server-side resources used by Simple Theme Changer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.72 ▲1.27
Dashboard /wp-admin3.35 ▲0.0451.18 ▼0.69
Posts /wp-admin/edit.php3.46 ▲0.1050.34 ▼0.32
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.56 ▼11.60
Media Library /wp-admin/upload.php3.27 ▲0.0437.21 ▼0.91

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
display_type
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Theme Changer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.45 ▲0.172.04 ▲0.2852.69 ▲9.38
Dashboard /wp-admin2,222 ▲314.98 ▼0.92106.35 ▼0.2344.15 ▼2.99
Posts /wp-admin/edit.php2,105 ▲162.05 ▼0.0035.77 ▼3.7532.13 ▼6.52
Add New Post /wp-admin/post-new.php1,527 ▼723.77 ▲0.71676.87 ▲41.0354.34 ▼12.92
Media Library /wp-admin/upload.php1,407 ▲194.18 ▼0.03109.10 ▼1.2649.30 ▲2.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-theme-changer/view_user_button.php
    • > /wp-content/plugins/simple-theme-changer/view_admin.php
    • > /wp-content/plugins/simple-theme-changer/theme_changer.php
    • > /wp-content/plugins/simple-theme-changer/class_theme_changer.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Contributors: Plugin contributors not specified
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Screenshots: A description for screenshot #1 is required in simple-theme-changer/assets to your readme.txt
You can look at the official readme.txt

simple-theme-changer/theme_changer.php 92% from 13 tests

The principal PHP file in "Simple Theme Changer" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-theme-changer.php" instead of "theme_changer.php")

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
There were no executable files found in this plugin486 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP537075486

PHP code Passed 2 tests

This is a very shot review of 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.41
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods316.67%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected