77% wp-foundation-shortcodes

Code Review | WP Foundation Shortcodes

WordPress plugin WP Foundation Shortcodes scored77%from 54 tests.

About plugin

  • Plugin page: wp-foundation-sho...
  • Plugin version: 0.8.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Sep 20, 2015
  • Latest release: Jul 3, 2016
  • Number of updates: 30
  • Update frequency: every 9.6 days
  • Top authors: adam1920 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /5,125 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

An overview of server-side resources used by WP Foundation Shortcodes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3938.87 ▼0.14
Dashboard /wp-admin3.77 ▲0.4246.16 ▼11.49
Posts /wp-admin/edit.php3.82 ▲0.4649.54 ▲0.57
Add New Post /wp-admin/post-new.php6.31 ▲0.42102.64 ▲16.68
Media Library /wp-admin/upload.php3.63 ▲0.3943.66 ▲11.19

Server storage [IO: ▲1.61MB] [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: 98 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Foundation Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲22813.59 ▼1.097.97 ▲6.0338.58 ▼11.88
Dashboard /wp-admin2,257 ▲695.85 ▼0.06109.09 ▲6.5476.40 ▲31.22
Posts /wp-admin/edit.php2,140 ▲512.02 ▲0.0239.25 ▼3.6535.77 ▼6.23
Add New Post /wp-admin/post-new.php1,576 ▲3423.41 ▲5.27628.34 ▼3.9349.91 ▼3.57
Media Library /wp-admin/upload.php1,436 ▲454.26 ▲0.04111.45 ▲0.5743.92 ▼4.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-foundation-shortcodes/wp-foundation-shortcodes-admin.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_post_thumbnail() in wp-content/plugins/wp-foundation-shortcodes/includes/content.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_post_thumbnail() in wp-content/plugins/wp-foundation-shortcodes/includes/post-lightbox-content.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/wp-foundation-shortcodes/includes/post-list-content.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-foundation-shortcodes === )
The official readme.txt is a good inspiration

wp-foundation-shortcodes/wp-foundation-shortcodes.php 77% from 13 tests

The primary PHP file in "WP Foundation Shortcodes" version 0.8.5 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages/")
  • Description: Please keep the plugin description shorter than 140 characters (currently 247 characters long)
  • Domain Path: The domain path must begin with a forward slash character ("/languages/")

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
Success! There were no dangerous files found in this plugin5,691 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
PHP113281582,129
JavaScript42130962,114
Sass223871,2251,078
PO File396123292
CSS20443
Markdown110019
JSON1008
Ruby15138

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity57.40
▷ Minimum class complexity4.00
▷ Maximum class complexity248.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods80
▷ Static methods6783.75%
▷ Public methods80100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/paypal_donate_button217x50.png15.20KB5.70KB▼ 62.50%
images/stars.png1.13KB0.65KB▼ 42.24%
images/icon-20x20.png3.13KB0.61KB▼ 80.44%