72% spiraclethemes-site-library

Code Review | Spiraclethemes Site Library

WordPress plugin Spiraclethemes Site Library scored 72% from 54 tests.

About plugin

  • Plugin page: spiraclethemes-si...
  • Plugin version: 1.2.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 28, 2020
  • Latest release: Apr 15, 2023
  • Number of updates: 25
  • Update frequency: every 38.4 days
  • Top authors: spiraclethemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active / 34,711 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.81MB] [CPU: ▼5.85ms] Passed 4 tests

An overview of server-side resources used by Spiraclethemes Site Library
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3436.36 ▼9.25
Dashboard /wp-admin4.27 ▲0.9751.90 ▼0.36
Posts /wp-admin/edit.php4.38 ▲1.0354.05 ▼5.76
Add New Post /wp-admin/post-new.php6.86 ▲0.9887.78 ▼8.03
Media Library /wp-admin/upload.php4.19 ▲0.9643.69 ▲6.41
Import Demo Data /wp-admin/admin.php?page=pt-one-click-demo-import4.0529.99
Import Demo Data /wp-admin/themes.php?page=one-click-demo-import4.4436.65

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 179 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
spiraclethemes_sitelib_install_date
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Spiraclethemes Site Library
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲5313.57 ▼1.111.52 ▼0.4534.73 ▼11.12
Dashboard /wp-admin2,227 ▲395.86 ▲0.98104.45 ▼32.3642.53 ▼4.75
Posts /wp-admin/edit.php2,115 ▲262.17 ▲0.1940.84 ▲6.6837.32 ▲0.76
Add New Post /wp-admin/post-new.php1,532 ▲1823.49 ▲5.82641.74 ▼5.3655.71 ▼16.59
Media Library /wp-admin/upload.php1,415 ▲244.25 ▲0.0598.86 ▲0.0341.90 ▼2.33
Import Demo Data /wp-admin/admin.php?page=pt-one-click-demo-import280.440.163.32
Import Demo Data /wp-admin/themes.php?page=one-click-demo-import1,1812.1130.2553.75

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: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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 fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/spiraclethemes-site-library/vendor/ocdi/one-click-demo-import.php
  • 23× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/spiraclethemes-site-library/elements/own-shop/recent-blog/template/view.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/spiraclethemes-site-library/elements/own-shop/new-prod/template/view.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'OCDI\\PluginInstaller' not found in wp-content/plugins/spiraclethemes-site-library/vendor/ocdi/views/import.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader.php' (include_path='.:/usr/share/php') in wp-content/plugins/spiraclethemes-site-library/vendor/ocdi/inc/PluginInstallerSkin.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'AwesomeMotive\\WPContentImporter2\\WPImporterLoggerCLI' not found in wp-content/plugins/spiraclethemes-site-library/vendor/ocdi/inc/Logger.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/spiraclethemes-site-library/elements/own-shop/list-prod/template/view.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/spiraclethemes-site-library/elements/blogson/post-grid/template/view.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/spiraclethemes-site-library/elements/own-shop/popular-prod/template/view.php:3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader.php): failed to open stream: No such file or directory in wp-content/plugins/spiraclethemes-site-library/vendor/ocdi/inc/PluginInstallerSkinSilent.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader.php' (include_path='.:/usr/share/php') in wp-content/plugins/spiraclethemes-site-library/vendor/ocdi/inc/PluginInstallerSkinSilent.php on line 11

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=pt-one-click-demo-import
    • > Network (severe)
    wp-admin/admin.php?page=pt-one-click-demo-import - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: themes, spiraclethemes, menus, content, widgets...

spiraclethemes-site-library/spiraclethemes-site-library.php 92% from 13 tests

The primary PHP file in "Spiraclethemes Site Library" version 1.2.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin115,541 lines of code in 123 files:
LanguageFilesBlank linesComment linesLines of code
XML262,2113,617103,445
PHP672,2763,1869,754
CSS421721,367
JavaScript3126114472
Markdown2900197
SVG1800127
Bourne Shell121899
JSON20080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity22.92
▷ Minimum class complexity1.00
▷ Maximum class complexity290.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes37.89%
Methods356
▷ Static methods5314.89%
▷ Public methods25972.75%
▷ Protected methods6117.13%
▷ Private methods3610.11%
Functions83
▷ Named functions7286.75%
▷ Anonymous functions1113.25%
Constants26
▷ Global constants1038.46%
▷ Class constants1661.54%
▷ Public constants16100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected