84% smaily-for-wp

Code Review | Smaily for WP

WordPress plugin Smaily for WP scored84%from 54 tests.

About plugin

  • Plugin page: smaily-for-wp
  • Plugin version: 3.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 1, 2020
  • Latest release: Nov 10, 2023
  • Number of updates: 21
  • Update frequency: every 70.1 days
  • Top authors: sendsmaily (71.43%)marispulk (23.81%)tomabel (14.29%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /31,364 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
Install script ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼5.65ms] Passed 4 tests

Analyzing server-side resources used by Smaily for WP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2239.25 ▼1.21
Dashboard /wp-admin3.56 ▲0.2147.66 ▼10.47
Posts /wp-admin/edit.php3.61 ▲0.2546.29 ▼2.19
Add New Post /wp-admin/post-new.php6.10 ▲0.2187.26 ▼8.74
Media Library /wp-admin/upload.php3.42 ▲0.1936.85 ▲3.05
Form /wp-admin/admin.php?page=smaily-for-wp3.4333.96

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 49 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
smailyforwp_db_version
widget_smaily_subscription_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Smaily for WP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6814.70 ▲0.291.77 ▲0.1740.27 ▼6.54
Dashboard /wp-admin2,220 ▲455.65 ▼0.0582.67 ▼19.7773.63 ▲29.08
Posts /wp-admin/edit.php2,125 ▲251.98 ▲0.0338.02 ▼2.2634.62 ▼2.02
Add New Post /wp-admin/post-new.php6,386 ▲4,85527.42 ▲4.33973.93 ▲362.2641.79 ▼8.55
Media Library /wp-admin/upload.php1,422 ▲284.15 ▼0.0199.21 ▲0.4576.83 ▲36.05
Form /wp-admin/admin.php?page=smaily-for-wp8622.0026.0830.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/smaily-for-wp/admin/partials/smaily-for-wp-admin-form.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/smaily-for-wp/public/partials/smaily-for-wp-public-advanced.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/smaily-for-wp/public/partials/smaily-for-wp-public-basic.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/smaily-for-wp/admin/partials/smaily-for-wp-admin-page.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/smaily-for-wp/includes/class-smaily-for-wp-widget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: api, plugin, sidebar, smaily, widget...

smaily-for-wp/smaily-for-wp.php Passed 13 tests

Analyzing the main PHP file in "Smaily for WP" version 3.1.2
36 characters long description:
Smaily newsletter subscription form.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,692 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP283411,2481,510
Markdown11210553
JavaScript294228425
PO File14554115
CSS392467
JSON20022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity13.67
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods110
▷ Static methods2018.18%
▷ Public methods8980.91%
▷ Protected methods00.00%
▷ Private methods2119.09%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants4
▷ Global constants4100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
gfx/icon.png0.61KB0.51KB▼ 16.56%
gfx/remove.png0.17KB0.17KB0.00%