84% snippets-plus

Code Review | Snippets Plus

WordPress plugin Snippets Plus scored84%from 54 tests.

About plugin

  • Plugin page: snippets-plus
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 17, 2014
  • Latest release: Jul 26, 2014
  • Number of updates: 12
  • Update frequency: every 3.3 days
  • Top authors: shazdeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /795 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.28ms] Passed 4 tests

Analyzing server-side resources used by Snippets Plus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.55 ▼3.15
Dashboard /wp-admin3.35 ▲0.0550.58 ▼0.81
Posts /wp-admin/edit.php3.40 ▲0.0444.53 ▼4.69
Add New Post /wp-admin/post-new.php5.93 ▲0.0581.41 ▼12.48
Media Library /wp-admin/upload.php3.27 ▲0.0435.52 ▲1.83

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Snippets Plus
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.131.76 ▼0.2645.24 ▼2.59
Dashboard /wp-admin2,195 ▲245.62 ▲0.0592.51 ▼6.7144.40 ▲0.46
Posts /wp-admin/edit.php2,097 ▼32.00 ▼0.0034.11 ▲0.2436.42 ▲1.67
Add New Post /wp-admin/post-new.php1,526 ▼523.31 ▲0.39648.22 ▲21.3950.90 ▼13.48
Media Library /wp-admin/upload.php1,394 ▼64.21 ▲0.0198.33 ▲2.3644.12 ▲1.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_snippets-plus
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/snippets-plus/includes/polylang-compat.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/snippets-plus/snippets-plus.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: page, pages, polylang, widgets, sidebar...

snippets-plus/snippets-plus.php Passed 13 tests

Analyzing the main PHP file in "Snippets Plus" version 0.1.2
123 characters long description:
This widget allows you to create dynamic "regions" in widget areas that their content can be specified on a per-post basis.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin182 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23427182

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity16.50
▷ Minimum class complexity6.00
▷ Maximum class complexity27.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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