62% simple-theme-demo-importer

Code Review | Simple Theme Demo Importer Plugin

WordPress plugin Simple Theme Demo Importer Plugin scored62%from 54 tests.

About plugin

  • Plugin page: simple-theme-demo...
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-5.5.6
  • WordPress version: 6.3.1
  • First release: Mar 27, 2019
  • Latest release: Feb 15, 2021
  • Number of updates: 25
  • Update frequency: every 27.7 days
  • Top authors: tristup (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /11,146 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.93MB] [CPU: ▼34.43ms] Passed 4 tests

Analyzing server-side resources used by Simple Theme Demo Importer Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.75 ▼6.79
Dashboard /wp-admin3.02 ▼0.2925.81 ▼21.33
Posts /wp-admin/edit.php3.02 ▼0.3428.35 ▼21.20
Add New Post /wp-admin/post-new.php3.02 ▼2.8728.50 ▼78.26
Media Library /wp-admin/upload.php3.02 ▼0.2122.40 ▼16.94
Status /wp-admin/admin.php?page=simple-theme-demo-importer-status-page3.0224.12
Import Demos /wp-admin/admin.php?page=simple-theme-demo-importer3.0225.85

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Simple Theme Demo Importer Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11714.20 ▼0.161.83 ▼0.1742.54 ▼2.11
Dashboard /wp-admin2,272 ▲925.66 ▼0.0299.59 ▲10.5177.97 ▲37.88
Posts /wp-admin/edit.php2,132 ▲322.04 ▲0.0339.71 ▲3.2835.87 ▲0.65
Add New Post /wp-admin/post-new.php1,557 ▲1223.19 ▲0.11726.62 ▲108.5383.33 ▲27.28
Media Library /wp-admin/upload.php1,423 ▲234.24 ▼0.0898.68 ▼9.9375.12 ▲28.37
Status /wp-admin/admin.php?page=simple-theme-demo-importer-status-page9662.0323.2828.98
Import Demos /wp-admin/admin.php?page=simple-theme-demo-importer8422.0724.7431.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=simple-theme-demo-importer
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% from 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-theme-demo-importer/templates/promotional-notice.php
    • > /wp-content/plugins/simple-theme-demo-importer/templates/dashboard-notice.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Trying to get property 'plugin_description' of non-object in wp-content/plugins/simple-theme-demo-importer/templates/promotional-notice.php on line 5
    • > PHP Warning
      Use of undefined constant SIMPLE_THEME_DEMO_IMPORT_SUPPORT_LINK - assumed 'SIMPLE_THEME_DEMO_IMPORT_SUPPORT_LINK' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-theme-demo-importer/templates/promotional-notice.php on line 7
    • > PHP Notice
      Undefined variable: promotion in wp-content/plugins/simple-theme-demo-importer/templates/promotional-notice.php on line 5
    • > PHP Notice
      Undefined variable: promotion in wp-content/plugins/simple-theme-demo-importer/templates/promotional-notice.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/simple-theme-demo-importer/templates/status-report.php:2
    • > PHP Warning
      Use of undefined constant SIMPLE_THEME_DEMO_IMPORT_PREMIUM_LINK - assumed 'SIMPLE_THEME_DEMO_IMPORT_PREMIUM_LINK' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-theme-demo-importer/templates/promotional-notice.php on line 5
    • > PHP Notice
      Trying to get property 'promotional_title' of non-object in wp-content/plugins/simple-theme-demo-importer/templates/promotional-notice.php on line 3

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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: demo importer, simple theme demo importer, guideline, theme demo, wordpressorg...

simple-theme-demo-importer/simple-theme-demo-importer.php 92% from 13 tests

The principal PHP file in "Simple Theme Demo Importer Plugin" v. 1.1.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin11,240 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
XML1292239,016
PHP62885221,942
CSS1350230
JSON30027
JavaScript15025

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity59.67
▷ Minimum class complexity13.00
▷ Maximum class complexity183.00
Average method complexity5.96
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods71
▷ Static methods00.00%
▷ Public methods7098.59%
▷ Protected methods11.41%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot/screenshot_4.png20.37KB5.05KB▼ 75.19%
screenshot/screenshot_1.png32.89KB8.38KB▼ 74.52%
screenshot/screenshot_5.png38.09KB8.12KB▼ 78.68%
importer/demos/main/screenshot.png0.81KB0.77KB▼ 5.17%
screenshot/screenshot_2.png40.68KB9.40KB▼ 76.89%