72% wplr-theme-assistant

Code Review | WP/LR Theme Assistant

WordPress plugin WP/LR Theme Assistant scored72%from 54 tests.

About plugin

  • Plugin page: wplr-theme-assistant
  • Plugin version: 0.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.7
  • WordPress version: 6.3.1
  • First release: Nov 19, 2018
  • Latest release: May 21, 2021
  • Number of updates: 45
  • Update frequency: every 20.3 days
  • Top authors: TigrouMeow (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /7,895 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼5.04ms] Passed 4 tests

Analyzing server-side resources used by WP/LR Theme Assistant
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3052.09 ▲5.96
Dashboard /wp-admin3.68 ▲0.3455.91 ▼17.57
Posts /wp-admin/edit.php3.73 ▲0.3858.40 ▲5.59
Add New Post /wp-admin/post-new.php6.21 ▲0.33102.17 ▼14.12
Media Library /wp-admin/upload.php3.54 ▲0.3146.27 ▲5.93
Theme Assistant /wp-admin/admin.php?page=wplr-post_types-menu3.5439.27

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

An overview of browser requirements for WP/LR Theme Assistant
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▲0.082.22 ▲0.2743.66 ▲0.90
Dashboard /wp-admin2,198 ▲185.62 ▲0.0285.69 ▼7.7239.54 ▼0.88
Posts /wp-admin/edit.php2,103 ▲31.98 ▼0.0540.68 ▲6.0535.58 ▼1.05
Add New Post /wp-admin/post-new.php1,526 ▼1223.09 ▼0.25615.39 ▼73.5252.87 ▼10.08
Media Library /wp-admin/upload.php1,394 ▼64.19 ▲0.0695.85 ▼23.1143.55 ▼6.36
Theme Assistant /wp-admin/admin.php?page=wplr-post_types-menu7072.1323.0120.64

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wplr-post_types-menu
    • > Error in wp-content/plugins/wplr-theme-assistant/views/settings.php+2
    Uncaught Error: Call to a member function display_title() on null in wp-content/plugins/wplr-theme-assistant/views/settings.php:2
    Stack trace:
    #0 wp-content/plugins/wplr-theme-assistant/wplr-theme-assistant.php(582): include()
    #1 wp-includes/class-wp-hook.php(310): WPLR_Theme_Assistant->admin_settings()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wplr-theme-assistant/wplr-theme-assistant.php:19
    • > PHP Fatal error
      Uncaught Error: Call to a member function display_title() on null in wp-content/plugins/wplr-theme-assistant/views/settings.php:2
    • > PHP Notice
      Undefined variable: wplr_admin in wp-content/plugins/wplr-theme-assistant/views/settings.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=wplr-post_types-menu
    • > Console-api (severe) in wp-content/plugins/wplr-theme-assistant/modules/vue.js?ver=6.3.1+596:14
    [Vue warn]: Cannot find element: #mappings

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: lightroom, wplr-extension, wplr-sync, assistant

wplr-theme-assistant/wplr-theme-assistant.php 92% from 13 tests

The main PHP script in "WP/LR Theme Assistant" version 0.5.4 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 199 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected10,839 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,1181,4039,159
PHP52162971,473
CSS21727207

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity60.25
▷ Minimum class complexity13.00
▷ Maximum class complexity179.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods100
▷ Static methods55.00%
▷ Public methods9595.00%
▷ Protected methods00.00%
▷ Private methods55.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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