78% find-my-agent-user-and-switch-my-theme

Code Review | Find My Agent User and Switch my Theme

WordPress plugin Find My Agent User and Switch my Theme scored78%from 54 tests.

About plugin

  • Plugin page: find-my-agent-use...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Oct 8, 2012
  • Latest release: Oct 15, 2012
  • Number of updates: 16
  • Update frequency: every 0.6 days
  • Top authors: Rick Manu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,017 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.66ms] Passed 4 tests

This is a short check of server-side resources used by Find My Agent User and Switch my Theme
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.46 ▼0.66
Dashboard /wp-admin3.32 ▼0.0344.88 ▼14.18
Posts /wp-admin/edit.php3.37 ▲0.0146.11 ▲0.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.61 ▼18.94
Media Library /wp-admin/upload.php3.24 ▲0.0137.56 ▼0.84
Find My Agent User and Switch my Theme /wp-admin/themes.php?page=find-my-agent-user-and-switch-my-theme/find_my_agent_user_and_switch_my_theme.php3.2533.65

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Find My Agent User and Switch my Theme
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.53 ▼0.191.96 ▲0.2642.60 ▲3.74
Dashboard /wp-admin2,196 ▲195.56 ▼0.0282.12 ▼4.5435.14 ▼12.25
Posts /wp-admin/edit.php2,104 ▲71.97 ▼0.0432.19 ▼1.8339.07 ▲2.07
Add New Post /wp-admin/post-new.php1,531 ▲523.12 ▼0.32665.59 ▼1.5750.53 ▼7.34
Media Library /wp-admin/upload.php1,407 ▲104.16 ▼0.09109.04 ▲8.6446.75 ▲4.88
Find My Agent User and Switch my Theme /wp-admin/themes.php?page=find-my-agent-user-and-switch-my-theme/find_my_agent_user_and_switch_my_theme.php8532.0029.4227.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • mobile_theme_chosen
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/themes.php?page=find-my-agent-user-and-switch-my-theme/find_my_agent_user_and_switch_my_theme.php
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=find-my-agent-user-and-switch-my-theme/find_my_agent_user_and_switch_my_theme.php
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=find-my-agent-user-and-switch-my-theme/find_my_agent_user_and_switch_my_theme.php
    • > Notice in wp-content/plugins/find-my-agent-user-and-switch-my-theme/find_my_agent_user_and_switch_my_theme_html.php+16
    Undefined index: mobile_theme_chosen

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/find-my-agent-user-and-switch-my-theme/find_my_agent_user_and_switch_my_theme.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/find-my-agent-user-and-switch-my-theme/find_my_agent_user_and_switch_my_theme_html.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === find-my-agent-user-and-switch-my-theme === )
You can take inspiration from this readme.txt

find-my-agent-user-and-switch-my-theme/find_my_agent_user_and_switch_my_theme.php 92% from 13 tests

The principal PHP file in "Find My Agent User and Switch my Theme" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("find-my-agent-user-and-switch-my-theme.php" instead of "find_my_agent_user_and_switch_my_theme.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin63 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2182563

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions4
▷ Named functions4100.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
No PNG images were found in this plugin