84% s2member-pro-shortcode

Code Review | s2member-shortcode

WordPress plugin s2member-shortcode scored 84% from 54 tests.

About plugin

  • Plugin page: s2member-pro-shor...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 13, 2014
  • Latest release: Oct 13, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: colinhahn (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 1,348 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.04ms] Passed 4 tests

An overview of server-side resources used by s2member-shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.29 ▲2.33
Dashboard /wp-admin3.31 ▲0.0045.98 ▼6.72
Posts /wp-admin/edit.php3.36 ▲0.0045.64 ▼4.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.17 ▲5.33
Media Library /wp-admin/upload.php3.23 ▲0.0038.66 ▲4.71

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for s2member-shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.64 ▼0.801.76 ▲0.0840.14 ▼0.81
Dashboard /wp-admin2,206 ▲185.85 ▼0.05108.73 ▼5.8540.95 ▲1.12
Posts /wp-admin/edit.php2,086 ▼32.05 ▼0.0040.02 ▲0.1635.07 ▼1.17
Add New Post /wp-admin/post-new.php1,513 ▼1717.56 ▼0.58593.64 ▼67.8362.37 ▲0.10
Media Library /wp-admin/upload.php1,388 ▼04.27 ▼0.0293.11 ▼8.2941.38 ▼3.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/s2member-pro-shortcode/s2member-shortcode.php:55

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
There were no plugin tags found

s2member-pro-shortcode/s2member-shortcode.php 92% from 13 tests

The principal PHP file in "s2member-shortcode" v. 1.2.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("s2member-pro-shortcode.php" instead of "s2member-shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected32 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1121532

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin