90% arya-switch-theme

Code Review | Arya Switch Theme

WordPress plugin Arya Switch Theme scored90%from 54 tests.

About plugin

  • Plugin page: arya-switch-theme
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 6.3.1
  • First release: May 22, 2019
  • Latest release: May 22, 2019
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: aryathemes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /656 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼11.96ms] Passed 4 tests

An overview of server-side resources used by Arya Switch Theme
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.61 ▼4.26
Dashboard /wp-admin3.34 ▼0.0147.68 ▼17.54
Posts /wp-admin/edit.php3.39 ▲0.0349.61 ▼3.49
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.89 ▼22.56
Media Library /wp-admin/upload.php3.26 ▲0.0336.83 ▲1.78

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Arya Switch Theme
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.11 ▼1.274.63 ▲2.7438.12 ▼4.88
Dashboard /wp-admin2,203 ▲145.79 ▼0.12118.77 ▲3.6945.13 ▲2.48
Posts /wp-admin/edit.php2,086 ▼61.99 ▲0.0038.46 ▼11.4234.96 ▼5.18
Add New Post /wp-admin/post-new.php1,514 ▼1417.58 ▼0.59657.63 ▲23.0857.47 ▼0.79
Media Library /wp-admin/upload.php1,391 ▲64.24 ▲0.0696.08 ▼5.7741.84 ▼2.48

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: utility, switch theme, preview, theme switcher, demo

arya-switch-theme/arya-switch-theme.php Passed 13 tests

The primary PHP file in "Arya Switch Theme" version 1.0.0 is used by WordPress to initiate all plugin functionality
128 characters long description:
Allows users to choose and preview all WordPress themes installed without activation or deactivation for demonstration purposes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin72 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2223172

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin