72% svt-simple

Code Review | SVT Simple

WordPress plugin SVT Simple scored72%from 54 tests.

About plugin

  • Plugin page: svt-simple
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.0.0
  • WordPress version: 6.3.1
  • First release: Oct 15, 2018
  • Latest release: Dec 8, 2018
  • Number of updates: 6
  • Update frequency: every 16.8 days
  • Top authors: pojamapeoples (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /832 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼2.06ms] Passed 4 tests

This is a short check of server-side resources used by SVT Simple
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2638.11 ▼5.69
Dashboard /wp-admin3.57 ▲0.2649.36 ▼1.60
Posts /wp-admin/edit.php3.62 ▲0.2652.44 ▲7.83
Add New Post /wp-admin/post-new.php6.10 ▲0.2295.55 ▼1.97
Media Library /wp-admin/upload.php3.43 ▲0.2039.77 ▲1.02
SVT Simple Settings /wp-admin/options-general.php?page=svt-simple3.4533.90

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

SVT Simple: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲15714.28 ▼0.2515.82 ▲14.0343.59 ▲3.61
Dashboard /wp-admin2,211 ▲315.67 ▼0.0493.39 ▲4.6042.94 ▲3.09
Posts /wp-admin/edit.php2,120 ▲202.16 ▲0.1541.15 ▲1.2338.67 ▲6.56
Add New Post /wp-admin/post-new.php1,541 ▲423.03 ▲5.01607.93 ▼22.9859.82 ▼36.75
Media Library /wp-admin/upload.php1,416 ▲194.21 ▼0.00102.90 ▲1.1444.62 ▲1.97
SVT Simple Settings /wp-admin/options-general.php?page=svt-simple1,1175.2387.8945.72

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

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/svt-simple/public/partials/svt-simple-lightbox.php
    • > /wp-content/plugins/svt-simple/public/partials/svt-simple-public-display.php
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined index: lat in wp-content/plugins/svt-simple/public/partials/svt-simple-lightbox.php on line 36
    • > PHP Notice
      Undefined index: lon in wp-content/plugins/svt-simple/public/partials/svt-simple-lightbox.php on line 36
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/svt-simple/includes/logging/AbstractLogger.php:12
    • > PHP Notice
      Undefined index: thePitch in wp-content/plugins/svt-simple/public/partials/svt-simple-lightbox.php on line 46
    • > PHP Notice
      Undefined index: lat in wp-content/plugins/svt-simple/public/partials/svt-simple-lightbox.php on line 35
    • > PHP Notice
      Undefined index: theZoom in wp-content/plugins/svt-simple/public/partials/svt-simple-lightbox.php on line 43
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/svt-simple/includes/logging/logger.php:29
    • > PHP Notice
      Undefined index: lon in wp-content/plugins/svt-simple/public/partials/svt-simple-lightbox.php on line 35
    • > PHP Notice
      Undefined index: key in wp-content/plugins/svt-simple/public/partials/svt-simple-lightbox.php on line 15
    • > PHP Notice
      Undefined index: theZoom in wp-content/plugins/svt-simple/public/partials/svt-simple-lightbox.php on line 36

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=svt-simple
    • > Console-api (severe) in unknown
    https://maps.googleapis.com/maps/api/js?key=a%20valid%20Google%20Maps%20API%20key&callback=initMap 128:248 "Google Maps JavaScript API error: InvalidKeyMapError\nhttps://developers.google.com/maps/documentation/javascript/error-messages#invalid-key-map-error"
    • > GET request to /wp-admin/options-general.php?page=svt-simple
    • > Javascript (severe) in unknown
    https://maps.googleapis.com/maps-api-v3/api/js/54/10/map.js 1:207 Uncaught TypeError: Cannot read properties of undefined (reading 'hasAttribute')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

svt-simple/svt-simple.php 92% from 13 tests

The main file in "SVT Simple" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,206 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP17278755967
PO File16780215
SVG10118
JavaScript32345
CSS30151

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.55
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods77
▷ Static methods33.90%
▷ Public methods6584.42%
▷ Protected methods33.90%
▷ Private methods911.69%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/pegman.png1.41KB0.45KB▼ 67.94%