78% ts-demo-importer

Code Review | TS Demo Importer

WordPress plugin TS Demo Importer scored78%from 54 tests.

About plugin

  • Plugin page: ts-demo-importer
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2022
  • Latest release: Feb 27, 2023
  • Number of updates: 16
  • Update frequency: every 22.2 days
  • Top authors: themeshopy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,085 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.85MB] [CPU: ▲16.18ms] Passed 4 tests

Server-side resources used by TS Demo Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /9.38 ▲5.9169.37 ▲25.54
Dashboard /wp-admin5.14 ▲1.8363.27 ▲14.23
Posts /wp-admin/edit.php5.26 ▲1.9061.82 ▲12.99
Add New Post /wp-admin/post-new.php7.73 ▲1.84110.19 ▲18.97
Media Library /wp-admin/upload.php5.05 ▲1.8153.43 ▲18.54
Tags /wp-admin/edit-tags.php?taxonomy=eventtags&post_type=events5.0754.90
Add New /wp-admin/post-new.php?post_type=projects5.2063.51
Testimonial /wp-admin/edit.php?post_type=testimonials5.1154.53
Team /wp-admin/edit.php?post_type=team5.1155.33
License Activation /wp-admin/themes.php?page=ts-demoimporter-license5.0451.10
Categories /wp-admin/edit-tags.php?taxonomy=eventscategory&post_type=events5.0749.99
Add New /wp-admin/post-new.php?post_type=testimonials5.1867.17
Services /wp-admin/edit.php?post_type=services5.1152.19
TS Setup Wizard /wp-admin/themes.php?page=tsdemoimporter-wizard5.0563.46
Add New /wp-admin/post-new.php?post_type=team5.1859.72

Server storage [IO: ▲96.24MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • Try to limit filesystem usage to 25MB (currently using 96.24MB)
Filesystem: 565 new files
Database: no new tables, 9 new options
New WordPress options
widget_tdi_widget
widget_vw_bakery_social_widget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_ts_demo_importer_cta_banner_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for TS Demo Importer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,306 ▲52015.42 ▲0.8113.02 ▲11.0140.56 ▼4.05
Dashboard /wp-admin2,528 ▲3516.32 ▲0.70115.18 ▲22.0341.78 ▼0.63
Posts /wp-admin/edit.php2,460 ▲3603.46 ▲1.4853.03 ▲17.2332.82 ▼2.82
Add New Post /wp-admin/post-new.php6,436 ▲4,90826.03 ▲3.03886.66 ▲181.0539.01 ▼15.18
Media Library /wp-admin/upload.php1,596 ▲1964.09 ▼0.1488.69 ▼9.0846.95 ▲4.99
Tags /wp-admin/edit-tags.php?taxonomy=eventtags&post_type=events1,6333.4848.2531.10
Add New /wp-admin/post-new.php?post_type=projects2,9137.94209.6272.96
Testimonial /wp-admin/edit.php?post_type=testimonials1,4243.5052.6028.67
Team /wp-admin/edit.php?post_type=team1,4213.5452.2429.28
License Activation /wp-admin/themes.php?page=ts-demoimporter-license1,1873.2743.8738.71
Categories /wp-admin/edit-tags.php?taxonomy=eventscategory&post_type=events1,6303.4648.6032.98
Add New /wp-admin/post-new.php?post_type=testimonials2,5597.85204.7065.35
Services /wp-admin/edit.php?post_type=services1,4553.4951.0630.53
TS Setup Wizard /wp-admin/themes.php?page=tsdemoimporter-wizard1,5133.3951.22118.34
Add New /wp-admin/post-new.php?post_type=team2,5857.79167.0954.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_vw_bakery_social_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_ts_demo_importer_cta_banner_widget
    • widget_theysaidso_widget
    • db_upgraded
    • widget_tdi_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 91× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/ts-demo-importer/template-parts/home/section-pricing-plan.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ts-demo-importer/inc/customize/customizer.php:138
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/ts-demo-importer/inc/customize/sections/customizer-part-inner-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/ts-demo-importer/template-parts/home/section-hiring-features.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/ts-demo-importer/template-parts/home/section-our-projects-tab.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ts-demo-importer/page-template/home-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/ts-demo-importer/template-parts/home/section-our-brands.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/ts-demo-importer/template-parts/home/section-banner.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/ts-demo-importer/template-parts/home/section-our-services.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ts-demo-importer/page-template/blog-fullwidth-extend.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=team
    • > Network (severe)
    wp-content/plugins/ts-demo-importer/posttype//js/img-metabox.js?ver=0.1.2 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 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
1 plugin tags: customizer

ts-demo-importer/ts-demo-importer.php Passed 13 tests

"TS Demo Importer" version 0.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
119 characters long description:
TS Demo Importer will allow you to add features of customizer and widgets. Which will be visible on front page of site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin80,065 lines of code in 162 files:
LanguageFilesBlank linesComment linesLines of code
PHP994,6294,32136,267
CSS391,54662924,790
JavaScript191,5871,4139,704
SVG5009,304

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.55
▷ Minimum class complexity1.00
▷ Maximum class complexity232.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes00.00%
Methods214
▷ Static methods73.27%
▷ Public methods18485.98%
▷ Protected methods2913.55%
▷ Private methods10.47%
Functions84
▷ Named functions84100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants1178.57%
▷ Class constants321.43%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
334 PNG files occupy 83.13MB with 27.70MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/Start-up-Theme-Assets/Clients/logo1.png9.20KB4.09KB▼ 55.56%
assets/images/Homepage/Events/November.png114.49KB113.82KB▼ 0.59%
assets/images/Homepage/Video/play-button.png1.89KB1.14KB▼ 39.66%
theme-wizard/assets/images/home_two.png218.17KB236.50KB0.00%
assets/images/Homepage/PersonalizedSupport/memphis-circle-shape.png14.49KB4.23KB▼ 70.79%