79% skolmaten

Code Review | Snillrik Skolmaten.se

WordPress plugin Snillrik Skolmaten.se scored79%from 54 tests.

About plugin

  • Plugin page: skolmaten
  • Plugin version: 1.6.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2018
  • Latest release: Oct 12, 2023
  • Number of updates: 18
  • Update frequency: every 113.9 days
  • Top authors: mattiaspkallio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /759 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.41ms] Passed 4 tests

An overview of server-side resources used by Snillrik Skolmaten.se
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.40 ▲0.29
Dashboard /wp-admin3.38 ▲0.0847.87 ▲2.57
Posts /wp-admin/edit.php3.49 ▲0.1446.20 ▲1.02
Add New Post /wp-admin/post-new.php5.96 ▲0.0779.36 ▼18.23
Media Library /wp-admin/upload.php3.30 ▲0.0736.34 ▼0.70

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_skolmaten
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Snillrik Skolmaten.se
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲10914.23 ▼0.121.66 ▲0.0742.96 ▲1.39
Dashboard /wp-admin2,276 ▲995.67 ▲0.0683.33 ▼1.9569.24 ▲22.43
Posts /wp-admin/edit.php2,184 ▲841.98 ▲0.0138.68 ▲2.9735.25 ▲0.13
Add New Post /wp-admin/post-new.php1,601 ▲6622.88 ▲4.79688.44 ▲88.8661.15 ▼2.75
Media Library /wp-admin/upload.php1,481 ▲874.24 ▲0.0995.28 ▼2.7881.54 ▲38.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_skolmaten
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/skolmaten/classes/shortcodes.php
    • > /wp-content/plugins/skolmaten/classes/skolmaten_api.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'SkolmatenWidget' not found in wp-content/plugins/skolmaten/classes/widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/skolmaten/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/skolmaten/skolmaten.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: dinskolmat, lunchmeny

skolmaten/skolmaten.php Passed 13 tests

Analyzing the main PHP file in "Snillrik Skolmaten.se" version 1.6.3
45 characters long description:
Skolmaten hämtar en meny ifrån skolmaten.se

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected846 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
SVG252484
PHP55656283
CSS314079

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.00
▷ Minimum class complexity8.00
▷ Maximum class complexity25.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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.13MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/snillrik_small.png47.32KB4.84KB▼ 89.77%
images/dudes.png38.74KB16.98KB▼ 56.18%
images/snillrik_medium.png46.02KB8.39KB▼ 81.77%