83% ot-social-icons

Code Review | OT Social Icons

WordPress plugin OT Social Icons scored83%from 54 tests.

About plugin

  • Plugin page: ot-social-icons
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.2.4
  • WordPress version: 6.3.1
  • First release: Aug 10, 2015
  • Latest release: Aug 20, 2015
  • Number of updates: 12
  • Update frequency: every 0.8 days
  • Top authors: jobayer007 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,015 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.03MB] [CPU: ▼6.32ms] Passed 4 tests

Analyzing server-side resources used by OT Social Icons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0344.49 ▲0.92
Dashboard /wp-admin3.33 ▲0.0352.50 ▼6.03
Posts /wp-admin/edit.php3.39 ▲0.0347.28 ▼7.43
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.19 ▼12.74
Media Library /wp-admin/upload.php3.26 ▲0.0236.73 ▲3.05

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_ot_social
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by OT Social Icons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.37 ▼0.382.08 ▲0.2438.82 ▼5.22
Dashboard /wp-admin2,195 ▲185.57 ▼0.0698.04 ▲0.4842.18 ▲1.46
Posts /wp-admin/edit.php2,103 ▼02.05 ▲0.0034.35 ▼11.4834.08 ▼5.86
Add New Post /wp-admin/post-new.php1,545 ▲1423.43 ▲0.29699.10 ▲47.8652.93 ▼9.51
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.04103.55 ▼0.3745.22 ▼4.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_ot_social
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ot-social-icons/ot_social.php:13

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 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === ot-social-icons === )
  • Contributors: Plugin contributors not specified
The official readme.txt might help

ot-social-icons/ot_social.php 85% from 13 tests

The entry point to "OT Social Icons" version 1.1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ot-social-icons.php" instead of "ot_social.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

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 plugin164 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP151193
CSS24071

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin