84% snappy-year-shortcode

Code Review | Snappy Year Shortcode

WordPress plugin Snappy Year Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: snappy-year-short...
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.2.1
  • WordPress version: 6.3.1
  • First release: May 5, 2019
  • Latest release: May 24, 2019
  • Number of updates: 8
  • Update frequency: every 2.6 days
  • Top authors: miniweblab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /494 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by Snappy Year Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.96 ▼6.49
Dashboard /wp-admin3.31 ▲0.0143.94 ▼9.36
Posts /wp-admin/edit.php3.36 ▲0.0047.03 ▼1.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.67 ▼4.46
Media Library /wp-admin/upload.php3.23 ▲0.0033.78 ▼0.05

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Snappy Year Shortcode: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.14 ▼1.241.64 ▼0.3040.51 ▼4.23
Dashboard /wp-admin2,209 ▲215.86 ▲1.03105.76 ▼11.9540.24 ▼5.28
Posts /wp-admin/edit.php2,089 ▲182.01 ▼0.0140.19 ▲3.7335.92 ▲1.49
Add New Post /wp-admin/post-new.php1,542 ▼018.20 ▼0.21610.03 ▲12.7853.30 ▲3.08
Media Library /wp-admin/upload.php1,391 ▼04.22 ▲0.0498.36 ▼1.6342.88 ▲1.95

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/snappy-year-shortcode/snappy-year-shortcode.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: copyright, current year, copyright symbol, year, current year shortcode...

snappy-year-shortcode/snappy-year-shortcode.php 92% from 13 tests

Analyzing the main PHP file in "Snappy Year Shortcode" version 2.0
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 225 characters long)

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
No dangerous file extensions were detected57 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2153657

PHP code Passed 2 tests

Analyzing 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.11
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin