74% shortcake-bakery

Code Review | Shortcake Bakery

WordPress plugin Shortcake Bakery scored74%from 54 tests.

About plugin

  • Plugin page: shortcake-bakery
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7.4
  • WordPress version: 6.3.1
  • First release: Jul 17, 2015
  • Latest release: May 3, 2017
  • Number of updates: 11
  • Update frequency: every 59.7 days
  • Top authors: danielbachhuber (90.91%)goldenapples (18.18%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /5,334 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.21MB] [CPU: ▼45.78ms] Passed 4 tests

Server-side resources used by Shortcake Bakery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6813.64 ▼29.52
Dashboard /wp-admin2.81 ▼0.5314.85 ▼45.53
Posts /wp-admin/edit.php2.82 ▼0.5415.03 ▼31.95
Add New Post /wp-admin/post-new.php2.81 ▼3.0716.97 ▼76.13
Media Library /wp-admin/upload.php2.81 ▼0.4115.71 ▼18.54

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 453 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Shortcake Bakery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.521.80 ▼0.1941.82 ▼2.66
Dashboard /wp-admin2,203 ▲155.80 ▲0.9396.27 ▼9.3937.75 ▼9.70
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0235.47 ▼2.8033.32 ▼2.23
Add New Post /wp-admin/post-new.php1,542 ▲2218.32 ▼5.00643.04 ▼61.7951.85 ▼1.49
Media Library /wp-admin/upload.php1,390 ▼14.18 ▼0.0596.45 ▲1.9541.56 ▼4.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/shortcake-bakery/shortcake-bakery.php+46
    implode(): Passing glue string after array is deprecated. Swap the parameters
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

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
Good news, no errors were detected

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
Please take a closer look at the following
  • 25× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Shortcake_Bakery\\Shortcodes\\Shortcode' not found in wp-content/plugins/shortcake-bakery/inc/shortcodes/class-scribd.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Shortcake_Bakery\\Shortcodes\\Shortcode' not found in wp-content/plugins/shortcake-bakery/inc/shortcodes/class-playbuzz.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Shortcake_Bakery\\Shortcodes\\Shortcode' not found in wp-content/plugins/shortcake-bakery/inc/shortcodes/class-videoo.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Shortcake_Bakery\\Shortcodes\\Shortcode' not found in wp-content/plugins/shortcake-bakery/inc/shortcodes/class-infogram.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Shortcake_Bakery\\Shortcodes\\Shortcode' not found in wp-content/plugins/shortcake-bakery/inc/shortcodes/class-pdf.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Shortcake_Bakery\\Shortcodes\\Shortcode' not found in wp-content/plugins/shortcake-bakery/inc/shortcodes/class-script.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Shortcake_Bakery\\Shortcodes\\Shortcode' not found in wp-content/plugins/shortcake-bakery/inc/shortcodes/class-googledocs.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Shortcake_Bakery\\Shortcodes\\Shortcode' not found in wp-content/plugins/shortcake-bakery/inc/shortcodes/class-vine.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Shortcake_Bakery\\Shortcodes\\Shortcode' not found in wp-content/plugins/shortcake-bakery/inc/shortcodes/class-livestream.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Shortcake_Bakery\\Shortcodes\\Shortcode' not found in wp-content/plugins/shortcake-bakery/inc/shortcodes/class-vimeo.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Shortcodes are accessible through the Insert Element screen, exposed in the media library.), #2 (Shortcodes preview in the visual editor, with a quick edit button to provide easy access to attribute fields.), #3 (The image comparison shortcode is powered by JuxtaposeJS, a tool built by the Northwestern University Knight Lab.), #4 (We've added an Infogram shortcode that accepts public Infogram URL's.), #5 (Scribd shortcodes let you embed documents easily in your WordPress content.), #6 (The script shortcode lets you embed whitelisted sources.), #7 (Same with the iFrame shortcode.), #8 (The RapGenius shortcode doesn't do anything in the admin – but on the frontend, it adds annotations to your post.), #9 (The PDF shortcode wraps your document in a nifty viewer tool.), #10 (Most Facebook URL's can be embedded with ease.), #11 (Playbuzz quizs can be embedded, with a few options supported.), #12 (Clicking the "Add Embed" button brings up a from to insert a provided embed code. If an embed code doesn't match a known shortcode, a warning will be displayed. (Note - other plugins such as WordPress VIP's Protected Embeds functionality that reverse arbitrary embed codes to shortcodes in other ways can also hook in to this and make their own replacements.)), #13 (If an embed code can be recognized as matching one of the Shortcake Bakery shortcodes, or any shortcodes which make use of this plugin's API, it can be inserted from this screen...), #14 (... and it will be sent to the editor as the corresponding shortcode, rather than the full embed code.)
Please take inspiration from this readme.txt

shortcake-bakery/shortcake-bakery.php Passed 13 tests

The entry point to "Shortcake Bakery" version 0.2.0 is a PHP file that has certain tags in its header comment area
49 characters long description:
A fine selection of Shortcake-powered shortcodes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin74,806 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1641248069,843
PHP283623172,081
CSS3297412,065
HTML24320345
SVG2601184
Markdown1490121
PO File13643100
JSON10042
Sass15025

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity11.67
▷ Minimum class complexity4.00
▷ Maximum class complexity57.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes27
▷ Abstract classes13.70%
▷ Concrete classes2696.30%
▷ Final classes00.00%
Methods109
▷ Static methods9889.91%
▷ Public methods9688.07%
▷ Protected methods54.59%
▷ Private methods87.34%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
90 compressed PNG files occupy 1.51MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/lib/pdfjs/web/images/toolbarButton-print.png0.25KB0.38KB0.00%
assets/lib/pdfjs/web/images/texture.png2.36KB2.42KB0.00%
assets/lib/pdfjs/web/images/treeitem-collapsed-rtl@2x.png0.16KB0.21KB0.00%
assets/lib/pdfjs/web/images/secondaryToolbarButton-lastPage.png0.17KB0.25KB0.00%
screenshot-2.png11.45KB6.37KB▼ 44.32%