10% brozzme-switch-duplicate

Code Review | Brozzme Switch and Duplicate

WordPress plugin Brozzme Switch and Duplicate scored10%from 54 tests.

About plugin

  • Plugin page: brozzme-switch-du...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Mar 2, 2017
  • Latest release: Oct 28, 2021
  • Number of updates: 30
  • Update frequency: every 56.7 days
  • Top authors: Benoti (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /2,771 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/brozzme-switch-duplicate/brozzme_switch_duplicate.php+96
    Trying to access array offset on value of type bool

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

This is a short check of server-side resources used by Brozzme Switch and Duplicate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.49 ▼2.74
Dashboard /wp-admin3.36 ▲0.0148.42 ▼22.29
Posts /wp-admin/edit.php3.42 ▲0.0749.74 ▼3.84
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.30 ▼30.09
Media Library /wp-admin/upload.php3.28 ▲0.0536.60 ▲0.78
Switcher & Duplicate /wp-admin/admin.php?page=brozzme-switch-duplicate-settings3.2432.36
Brozzme /wp-admin/admin.php?page=brozzme-plugins3.0932.92

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 9 new options
New WordPress options
bsd_settings
bsd_duplicate_settings
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
bsd_switcher_settings
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Brozzme Switch and Duplicate
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲10513.68 ▼0.765.46 ▲3.4840.81 ▼2.35
Dashboard /wp-admin2,232 ▲444.86 ▼0.04104.19 ▼1.2040.19 ▼0.20
Posts /wp-admin/edit.php2,193 ▲1042.07 ▲0.0437.42 ▼4.1333.54 ▼2.57
Add New Post /wp-admin/post-new.php1,555 ▲3623.24 ▲0.26630.01 ▼24.2751.32 ▼9.90
Media Library /wp-admin/upload.php1,417 ▲264.18 ▼0.05100.59 ▼4.7347.66 ▲3.72
Switcher & Duplicate /wp-admin/admin.php?page=brozzme-switch-duplicate-settings8981.6725.4129.72
Brozzme /wp-admin/admin.php?page=brozzme-plugins1,1222.0325.2131.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • bsd_settings
    • db_upgraded
    • bsd_duplicate_settings
    • bsd_switcher_settings
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=brozzme-plugins
    • > Notice in wp-content/plugins/brozzme-switch-duplicate/brozzme_switch_duplicate.php+114
    Undefined property: brozzme_switch_duplicate::$plugin_txt_domain

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: switcher, duplicate, post-type, cpt, clone...

brozzme-switch-duplicate/brozzme_switch_duplicate.php 92% from 13 tests

The main file in "Brozzme Switch and Duplicate" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("brozzme-switch-duplicate.php" instead of "brozzme_switch_duplicate.php")

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 plugin1,047 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP63143531,014
JavaScript121933

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity25.80
▷ Minimum class complexity13.00
▷ Maximum class complexity40.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods62
▷ Static methods11.61%
▷ Public methods5893.55%
▷ Protected methods00.00%
▷ Private methods46.45%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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 files were detected