67% wp-jam-session

Code Review | WP Jam Session

WordPress plugin WP Jam Sessionscored67%from 54 tests.

About plugin

  • Plugin page: wp-jam-session
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Dec 22, 2017
  • Latest release: Jan 20, 2020
  • Number of updates: 12
  • Update frequency: every 63.3 days
  • Top authors: llister (75%)mrlister1 (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /777 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.41ms] Passed 4 tests

Analyzing server-side resources used by WP Jam Session
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.41 ▲2.34
Dashboard /wp-admin3.33 ▼0.0251.88 ▼13.56
Posts /wp-admin/edit.php3.38 ▲0.0248.84 ▼3.69
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.19 ▼22.73
Media Library /wp-admin/upload.php3.25 ▲0.0245.12 ▲6.85

Server storage [IO: ▲0.57MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Jam Session
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲6514.43 ▲0.471.71 ▼0.7243.27 ▲0.57
Dashboard /wp-admin2,254 ▲515.82 ▼0.00101.35 ▼6.4976.31 ▲34.18
Posts /wp-admin/edit.php2,136 ▲362.02 ▼0.0435.01 ▼6.9632.68 ▼3.28
Add New Post /wp-admin/post-new.php1,713 ▲16822.03 ▼1.23722.22 ▲38.8558.24 ▲6.86
Media Library /wp-admin/upload.php1,430 ▲364.26 ▲0.0799.60 ▼9.0965.90 ▲18.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wp-jam-session/admin/partials/wp-jam-session-start-session.php+38
    Undefined index: expiration
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-jam-session/admin/partials/wp-jam-session-request.php
    • > /wp-content/plugins/wp-jam-session/admin/partials/wp-jam-session-accepted-values.php
    • > /wp-content/plugins/wp-jam-session/admin/partials/wp-jam-session-start-session.php
    • > /wp-content/plugins/wp-jam-session/admin/partials/wp-jam-session-settings-ajax.php
    • > /wp-content/plugins/wp-jam-session/admin/partials/wp-jam-session-faq-tab.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-jam-session/admin/partials/wp-jam-session-add-action-links.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-jam-session/admin/partials/wp-jam-session-settings-tab.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-jam-session/admin/partials/wp-jam-session-admin-display.php:39

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #2, #3, #4 in wp-jam-session/assets to your readme.txt
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === WP Jam Session=== )
  • Requires php: Version format is invalid
The official readme.txt is a good inspiration

wp-jam-session/wp-jam-session.php 92% from 13 tests

Analyzing the main PHP file in "WP Jam Session" version 1.1.1
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 247 characters long)

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 plugin1,385 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP17174604768
SVG441328
Sass1302151
JavaScript22232136
CSS2052

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity2.83
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1982.61%
▷ Protected methods00.00%
▷ Private methods417.39%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/jam-session-logo.png39.98KB17.82KB▼ 55.43%