78% post-snippet

Code Review | Post Snippet

WordPress plugin Post Snippet scored78%from 54 tests.

About plugin

  • Plugin page: post-snippet
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.4
  • WordPress version: 6.3.1
  • First release: Dec 28, 2015
  • Latest release: Jan 9, 2016
  • Number of updates: 9
  • Update frequency: every 1.3 days
  • Top authors: weiluri (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,381 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.54ms] Passed 4 tests

Analyzing server-side resources used by Post Snippet
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.50 ▼0.96
Dashboard /wp-admin3.32 ▲0.0248.40 ▲1.30
Posts /wp-admin/edit.php3.37 ▲0.0246.06 ▼1.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.99 ▼12.70
Media Library /wp-admin/upload.php3.24 ▲0.0237.71 ▲5.68

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_post_snippet_widget
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Post Snippet: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲15013.53 ▼1.286.14 ▲4.3443.14 ▲0.34
Dashboard /wp-admin2,208 ▲204.82 ▼0.10110.77 ▼3.1543.54 ▼0.29
Posts /wp-admin/edit.php2,094 ▲52.06 ▲0.0133.97 ▼2.2931.74 ▼4.10
Add New Post /wp-admin/post-new.php1,531 ▲1723.19 ▲5.52631.94 ▲7.5855.15 ▲2.83
Media Library /wp-admin/upload.php1,390 ▲24.31 ▲0.1196.40 ▼3.1042.04 ▲0.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_post_snippet_widget
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/post-snippet/post-snippet.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_permalink() in wp-content/plugins/post-snippet/views/narrow.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_permalink() in wp-content/plugins/post-snippet/views/wide.php:1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

post-snippet/post-snippet.php 92% from 13 tests

The main PHP file in "Post Snippet" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin957 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP48374555
CSS2255248
JavaScript22414154

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity49.50
▷ Minimum class complexity13.00
▷ Maximum class complexity86.00
Average method complexity7.06
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods850.00%
▷ Protected methods00.00%
▷ Private methods850.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin