77% glorious-sites-installer

Code Review | GloriousThemes Starter Sites

WordPress plugin GloriousThemes Starter Sites scored 77% from 54 tests.

About plugin

  • Plugin page: glorious-sites-in...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 5.9.2
  • First release: Mar 5, 2021
  • Latest release: Mar 11, 2021
  • Number of updates: 5
  • Update frequency: every 1.2 days
  • Top authors: gloriousthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 243 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.44MB] [CPU: ▼273.36ms] 75% from 4 tests

Analyzing server-side resources used by GloriousThemes Starter Sites
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,742.28ms on /wp-admin/admin.php?page=glorious-sites-installer)
PageMemory (MB)CPU Time (ms)
Home /8.40 ▲4.8976.92 ▲24.29
Dashboard /wp-admin8.42 ▲5.0160.07 ▲24.09
Posts /wp-admin/edit.php8.42 ▲4.7865.46 ▲24.16
Add New Post /wp-admin/post-new.php10.04 ▲3.06124.21 ▼1,155.48
Media Library /wp-admin/upload.php8.42 ▲5.1246.15 ▲13.80
Glorious Sites Installer /wp-admin/admin.php?page=glorious-sites-installer8.421,742.28
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius8.4244.60

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 284 new files
Database: no new tables, 4 new options
New WordPress options
fs_active_plugins
fs_debug_mode
fs_gdpr
fs_accounts

Browser metrics Passed 4 tests

GloriousThemes Starter Sites: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,818 ▲9615.86 ▲0.285.75 ▼1.002.22 ▼0.45
Dashboard /wp-admin2,943 ▲826.09 ▼0.13117.29 ▼13.89175.98 ▲17.08
Posts /wp-admin/edit.php2,742 ▲573.25 ▲0.0370.02 ▲4.96164.89 ▲19.56
Add New Post /wp-admin/post-new.php1,680 ▼7819.27 ▼2.07419.86 ▼29.91153.01 ▼7.16
Media Library /wp-admin/upload.php1,746 ▲485.54 ▲0.01159.47 ▲23.69209.37 ▲13.13
Glorious Sites Installer /wp-admin/admin.php?page=glorious-sites-installer1,2902.4655.46168.63
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius1,3992.7358.79112.59

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
  • Zombie WordPress options detected upon uninstall: 4 options
    • fs_active_plugins
    • fs_debug_mode
    • fs_gdpr
    • fs_accounts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/glorious-sites-installer/freemius/templates/ajax-loader.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/glorious-sites-installer/includes/importers/customize/class-oc-customize-demo-importer-setting.php:14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/glorious-sites-installer/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/glorious-sites-installer/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/glorious-sites-installer/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/glorious-sites-installer/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/glorious-sites-installer/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/glorious-sites-installer/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/glorious-sites-installer/freemius/templates/partials/network-activation.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Upgrader' not found in wp-content/plugins/glorious-sites-installer/includes/admin/class-demo-pack-upgrader.php:14
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/glorious-sites-installer/freemius/templates/account/partials/addon.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Theme Demos listing page.), #2 (Install and activate the required plugins.), #3 (Finally, Import the Demo with just one click.)
The official readme.txt is a good inspiration

glorious-sites-installer/glorious-sites-installer.php 92% from 13 tests

The principal PHP file in "GloriousThemes Starter Sites" v. 1.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Git Repository: Please do not include Git repositories in your plugin

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin65,433 lines of code in 222 files:
LanguageFilesBlank linesComment linesLines of code
PHP1298,04717,26934,245
PO File137,9829,63717,175
XML115305,764
Sass36485803,143
JavaScript125785982,833
CSS16174181,016
JSON510937
Markdown81060292
YAML22028

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,907)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity80.42
▷ Minimum class complexity1.00
▷ Maximum class complexity2,907.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes23.51%
Methods1,254
▷ Static methods19015.15%
▷ Public methods89971.69%
▷ Protected methods181.44%
▷ Private methods33726.87%
Functions105
▷ Named functions105100.00%
▷ Anonymous functions00.00%
Constants132
▷ Global constants10781.06%
▷ Class constants2518.94%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/glorious-sites-installer.png5.42KB2.55KB▼ 52.94%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%