90% am-social-widget

Code Review | AM Social Widget

WordPress plugin AM Social Widget scored90%from 54 tests.

About plugin

  • Plugin page: am-social-widget
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.3-5.0.3
  • WordPress version: 6.3.1
  • First release: Feb 15, 2019
  • Latest release: Feb 17, 2019
  • Number of updates: 6
  • Update frequency: every 8.8 days
  • Top authors: talentedaamer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /703 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.25ms] Passed 4 tests

An overview of server-side resources used by AM Social Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0443.76 ▼4.95
Dashboard /wp-admin3.35 ▲0.0449.46 ▼3.98
Posts /wp-admin/edit.php3.40 ▲0.0446.12 ▼9.88
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.54 ▼6.20
Media Library /wp-admin/upload.php3.27 ▲0.0438.50 ▲6.39

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_am-social-widget
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for AM Social Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲514.37 ▼0.191.90 ▼0.6844.63 ▼0.07
Dashboard /wp-admin2,195 ▲155.63 ▼0.0385.84 ▼13.3041.51 ▼2.56
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0135.12 ▼0.4336.21 ▼2.04
Add New Post /wp-admin/post-new.php1,529 ▲123.38 ▲0.31654.06 ▼21.5754.29 ▲5.58
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.01102.05 ▼0.8843.11 ▼7.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_am-social-widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: sharing, social media, buttons, widget, social...

am-social-widget/am-social-widget.php Passed 13 tests

"AM Social Widget" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
112 characters long description:
WordPress plugin that allows user to link to their social profiles like facebook, twitter, linkedIn, youtube etc

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
Good job! No executable or dangerous file extensions detected224 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP222110168
CSS21034
Markdown110022

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.00
▷ Minimum class complexity2.00
▷ Maximum class complexity14.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
2 PNG files occupy 0.12MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-2.png34.09KB10.07KB▼ 70.46%
assets/images/screenshot-1.png89.28KB24.61KB▼ 72.43%