78% sv-press-permit-show-available-content-for-user

Code Review | SV Press Permit Show Available Content for User

WordPress plugin SV Press Permit Show Available Content for User scored78%from 54 tests.

About plugin

  • Plugin page: sv-press-permit-s...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 8, 2018
  • Latest release: Mar 8, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: Matthias Reuter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /670 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by SV Press Permit Show Available Content for User
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.54 ▼7.12
Dashboard /wp-admin3.33 ▲0.0344.62 ▼2.32
Posts /wp-admin/edit.php3.45 ▲0.0943.18 ▼3.92
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.20 ▼9.46
Media Library /wp-admin/upload.php3.26 ▲0.0233.65 ▼0.68

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_sv_pp_showavailablecontentforuser
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for SV Press Permit Show Available Content for User
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.361.76 ▼0.1037.97 ▼5.95
Dashboard /wp-admin2,209 ▲214.85 ▲0.0096.86 ▼13.4339.68 ▼6.77
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0537.22 ▼3.9631.38 ▼3.94
Add New Post /wp-admin/post-new.php1,540 ▲723.29 ▲0.43602.60 ▼45.2854.49 ▲3.55
Media Library /wp-admin/upload.php1,382 ▼64.21 ▲0.0596.19 ▲1.7143.13 ▲1.15

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 does not fully uninstall, leaving 7 options in the database
    • widget_sv_pp_showavailablecontentforuser
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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 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 fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sv-press-permit-show-available-content-for-user/lib/tpl/SV_PP_ShowAvailableContentForUser.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sv-press-permit-show-available-content-for-user/lib/modules/widgets.php:2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sv-press-permit-show-available-content-for-user/lib/tpl/SV_PP_ShowAvailableContentForUser.php on line 3
    • > PHP Notice
      Undefined variable: content_IDs in wp-content/plugins/sv-press-permit-show-available-content-for-user/lib/tpl/SV_PP_ShowAvailableContentForUser.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/sv-press-permit-show-available-content-for-user/sv_pp_show_available_content_for_user.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'sv_pp_sacfu' not found in wp-content/plugins/sv-press-permit-show-available-content-for-user/lib/modules/integration.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'sv_pp_sacfu' not found in wp-content/plugins/sv-press-permit-show-available-content-for-user/lib/modules/hooks.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

sv-press-permit-show-available-content-for-user/sv_pp_show_available_content_for_user.php 85% from 13 tests

"SV Press Permit Show Available Content for User" 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:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sv-press-permit-show-available-content-for-user.php" instead of "sv_pp_show_available_content_for_user.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
Good job! No executable or dangerous file extensions detected126 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP521106126

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.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
No PNG images were found in this plugin