84% demo-awesome

Code Review | Demo Awesome

WordPress plugin Demo Awesome scored84%from 54 tests.

About plugin

  • Plugin page: demo-awesome
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Dec 30, 2018
  • Latest release: Aug 12, 2023
  • Number of updates: 11
  • Update frequency: every 153.3 days
  • Top authors: evgenyviner (72.73%)Romik84 (36.36%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /19,565 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by Demo Awesome
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.93 ▲1.73
Dashboard /wp-admin3.33 ▲0.0348.92 ▼5.96
Posts /wp-admin/edit.php3.44 ▲0.0950.57 ▲0.76
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.15 ▼19.45
Media Library /wp-admin/upload.php3.25 ▲0.0339.41 ▲2.73
Demo Awesome /wp-admin/themes.php?page=demo-awesome-importer3.39446.42

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Demo Awesome
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.28 ▼0.011.69 ▼0.0229.41 ▼12.07
Dashboard /wp-admin2,231 ▲545.56 ▼0.1386.75 ▼4.5478.09 ▲34.64
Posts /wp-admin/edit.php2,140 ▲402.12 ▲0.1141.22 ▲5.3939.75 ▲1.06
Add New Post /wp-admin/post-new.php1,558 ▲3023.31 ▲0.27718.46 ▲73.9561.39 ▲8.26
Media Library /wp-admin/upload.php1,436 ▲394.13 ▼0.0495.79 ▼9.7277.63 ▲33.87
Demo Awesome /wp-admin/themes.php?page=demo-awesome-importer1,8832.3332.5747.64

Uninstaller [IO: ▲0.01MB] [DB: ▲0.00MB] 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: demo_awesome_get_list_demos in wp-content/plugins/demo-awesome/inc/admin/demo-browser.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/demo-awesome/inc/admin/importer/class-extends-customize-demo-importer-setting.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/demo-awesome/inc/admin/class-demo-awesome-admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/demo-awesome/inc/admin/demo-browser.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: theme demo, demos, one-click demo import, data importer, theme4press demo...

demo-awesome/demo-awesome.php Passed 13 tests

This is the main PHP file of "Demo Awesome" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
136 characters long description:
Import the Theme4Press theme demo content including theme settings, menus, widgets, sliders, and much more with just one click. Awesome!

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 plugin5,208 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP146097293,129
JavaScript13041431,284
CSS214657757
SVG112038

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity42.50
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity5.53
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods110
▷ Static methods1412.73%
▷ Public methods10191.82%
▷ Protected methods10.91%
▷ Private methods87.27%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/admin/images/logo.png0.62KB0.62KB0.00%
inc/admin/images/loader.png10.11KB0.13KB▼ 98.75%