84% speisekarte

Code Review | Speisekarte

WordPress plugin Speisekarte scored84%from 54 tests.

About plugin

  • Plugin page: speisekarte
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: Sep 2, 2021
  • Latest release: Oct 6, 2021
  • Number of updates: 6
  • Update frequency: every 5.7 days
  • Top authors: malithmcr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /499 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.05ms] Passed 4 tests

Server-side resources used by Speisekarte
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.80 ▼2.87
Dashboard /wp-admin3.34 ▲0.0345.19 ▼7.30
Posts /wp-admin/edit.php3.39 ▲0.0346.32 ▼4.03
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.74 ▼2.00
Media Library /wp-admin/upload.php3.26 ▲0.0337.21 ▲3.81

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: 1 new table, 7 new options
New tables
wp_menu_cards
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
jal_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Speisekarte
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5513.15 ▼1.151.79 ▼0.8644.67 ▼2.05
Dashboard /wp-admin2,212 ▲245.83 ▲0.9198.12 ▼2.9540.95 ▼1.87
Posts /wp-admin/edit.php2,101 ▲122.06 ▲0.0640.41 ▼4.0235.40 ▼0.30
Add New Post /wp-admin/post-new.php1,552 ▲1918.19 ▼5.06638.01 ▼44.3150.29 ▼13.53
Media Library /wp-admin/upload.php1,400 ▲124.21 ▼0.0193.91 ▼20.5841.65 ▼7.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • jal_db_version
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/speisekarte/Speisekarte.php:33

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 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 to be fixed:
  • Screenshots: Add descriptions for screenshots #0, #0 in speisekarte/assets to your readme.txt
The official readme.txt might help

speisekarte/Speisekarte.php 92% from 13 tests

"Speisekarte" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("speisekarte.php" instead of "Speisekarte.php")

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
There were no executable files found in this plugin232 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP53135195
Markdown112037

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot_2.png60.44KB14.03KB▼ 76.78%
screenshot_1.png37.22KB9.82KB▼ 73.62%