84% templatespare

Code Review | Templatespare - Effortlessly import creative Starter Sites and have stylish websites within minutes!

WordPress plugin Templatespare - Effortlessly import creative Starter Sites and have stylish websites within minutes! scored84%from 54 tests.

About plugin

  • Plugin page: templatespare
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 16, 2023
  • Latest release: Nov 10, 2023
  • Number of updates: 9
  • Update frequency: every 33.1 days
  • Top authors: templatespare (100%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active /32,014 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.07MB] [CPU: ▼3.78ms] Passed 4 tests

Server-side resources used by Templatespare - Effortlessly import creative Starter Sites and have stylish websites within minutes!
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.14 ▼0.14
Dashboard /wp-admin3.39 ▲0.0551.96 ▼7.56
Posts /wp-admin/edit.php3.51 ▲0.1659.85 ▲13.95
Add New Post /wp-admin/post-new.php5.97 ▲0.0885.11 ▼11.04
Media Library /wp-admin/upload.php3.32 ▲0.0938.75 ▲3.62

Server storage [IO: ▲0.85MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Templatespare - Effortlessly import creative Starter Sites and have stylish websites within minutes!
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,281 ▲53420.70 ▲6.611.58 ▲0.0933.07 ▼7.78
Dashboard /wp-admin2,681 ▲50011.12 ▲5.40272.06 ▲171.52116.52 ▲71.52
Posts /wp-admin/edit.php2,519 ▲42210.93 ▲8.9191.01 ▲55.8329.50 ▼5.50
Add New Post /wp-admin/post-new.php1,706 ▲18023.32 ▲0.58546.70 ▼143.2431.12 ▼19.89
Media Library /wp-admin/upload.php1,936 ▲53912.79 ▲8.62149.15 ▲51.3442.29 ▼0.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant AFTMLS_PLUGIN_DIR - assumed 'AFTMLS_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/templatespare/includes/companion/class-aftc-main.php on line 10
    • > PHP Warning
      Use of undefined constant AFTMLS_PLUGIN_DIR - assumed 'AFTMLS_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/templatespare/includes/companion/class-aftc-logger.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'AFTMLS_Importer_Logger' not found in wp-content/plugins/templatespare/includes/companion/importer/class-logger-cli.php:3
    • > PHP Fatal error
      require(): Failed opening required 'AFTMLS_PLUGIN_DIRincludes/companion/importer/class-logger.php' (include_path='.:/usr/share/php') in wp-content/plugins/templatespare/includes/companion/class-aftc-logger.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/templatespare/includes/layouts/class-plugin-notice.php:11
    • > PHP Fatal error
      require(): Failed opening required 'AFTMLS_PLUGIN_DIRincludes/companion/importer/class-wxr-importer.php' (include_path='.:/usr/share/php') in wp-content/plugins/templatespare/includes/companion/class-aftc-wxr-importer.php on line 11
    • > PHP Warning
      require(AFTMLS_PLUGIN_DIRincludes/companion/importer/class-logger.php): failed to open stream: No such file or directory in wp-content/plugins/templatespare/includes/companion/class-aftc-logger.php on line 9
    • > PHP Warning
      require(AFTMLS_PLUGIN_DIRincludes/companion/importer/class-wxr-importer.php): failed to open stream: No such file or directory in wp-content/plugins/templatespare/includes/companion/class-aftc-wxr-importer.php on line 11
    • > PHP Warning
      Use of undefined constant AFTMLS_PLUGIN_URL - assumed 'AFTMLS_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/templatespare/includes/layouts/class-plugin-notice.php on line 9
    • > PHP Fatal error
      require(): Failed opening required 'AFTMLS_PLUGIN_DIRincludes/companion/class-aftc-helpers.php' (include_path='.:/usr/share/php') in wp-content/plugins/templatespare/includes/companion/class-aftc-main.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: customizer, starter sites, one click, blocks, widgets...

templatespare/templatespare.php Passed 13 tests

The primary PHP file in "Templatespare - Effortlessly import creative Starter Sites and have stylish websites within minutes!" version 1.2.0 is used by WordPress to initiate all plugin functionality
119 characters long description:
A beautiful collection of Ready to Import Starter Sites with just one click. Get modern & creative websites in minutes!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin6,861 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP201,4091,3086,014
SVG1241515
JavaScript37957331
CSS1001

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.41
Average class complexity32.62
▷ Minimum class complexity1.00
▷ Maximum class complexity266.00
Average method complexity4.74
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods137
▷ Static methods2618.98%
▷ Public methods8259.85%
▷ Protected methods3424.82%
▷ Private methods2115.33%
Functions20
▷ Named functions1680.00%
▷ Anonymous functions420.00%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.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
4 PNG files occupy 0.27MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/search-background.png192.41KB61.43KB▼ 68.07%
assets/images/elementor.png5.97KB5.98KB0.00%
assets/images/gutenberg.png64.54KB45.68KB▼ 29.21%
assets/images/wordpress.png16.35KB17.47KB0.00%