84% content-switcher

Code Review | Content Switcher

WordPress plugin Content Switcher scored 84% from 54 tests.

About plugin

  • Plugin page: content-switcher
  • Plugin version: 4.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 9, 2010
  • Latest release: Nov 13, 2022
  • Number of updates: 500
  • Update frequency: every 9.0 days
  • Top authors: Kleor (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 13,190 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.11ms] Passed 4 tests

A check of server-side resources used by Content Switcher
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.89 ▼7.07
Dashboard /wp-admin3.33 ▲0.0345.29 ▼26.00
Posts /wp-admin/edit.php3.38 ▲0.0345.34 ▲0.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.43 ▼0.35
Media Library /wp-admin/upload.php3.25 ▲0.0337.63 ▲4.53
Content Switcher /wp-admin/options-general.php?page=content-switcher3.3031.82

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Content Switcher
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.31 ▼1.074.49 ▲2.4741.54 ▼3.80
Dashboard /wp-admin2,213 ▲285.86 ▲0.95106.86 ▲0.1241.45 ▼1.10
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0140.50 ▲2.4732.82 ▼2.00
Add New Post /wp-admin/post-new.php6,490 ▲4,94820.36 ▲2.07911.22 ▲245.1654.70 ▼6.79
Media Library /wp-admin/upload.php1,386 ▼54.19 ▼0.0299.61 ▼3.5944.46 ▲2.57
Content Switcher /wp-admin/options-general.php?page=content-switcher8932.0223.2230.09

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 detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • content_switcher
    • db_upgraded

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 | 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
The following issues need your attention
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/content-switcher/libraries/index.php
    • > /wp-content/plugins/content-switcher/includes/index.php
    • > /wp-content/plugins/content-switcher/languages/index.php
    • > /wp-content/plugins/content-switcher/index.php

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

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
No tags were found

content-switcher/content-switcher.php 92% from 13 tests

The main file in "Content Switcher" v. 4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 163 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin547 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP158122438
PO File1370109

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions33
▷ Named functions2987.88%
▷ Anonymous functions412.12%
Constants6
▷ Global constants6100.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
No PNG files were detected