83% top-25-social-icons

Code Review | Top 25 Social Icons

WordPress plugin Top 25 Social Icons scored83%from 54 tests.

About plugin

  • Plugin page: top-25-social-icons
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 21, 2014
  • Latest release: Oct 10, 2023
  • Number of updates: 35
  • Update frequency: every 101.4 days
  • Top authors: dipenguru (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /51,250 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼7.07ms] Passed 4 tests

This is a short check of server-side resources used by Top 25 Social Icons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1547.06 ▲5.35
Dashboard /wp-admin3.44 ▲0.1046.83 ▼16.63
Posts /wp-admin/edit.php3.49 ▲0.1443.73 ▲2.71
Add New Post /wp-admin/post-new.php6.02 ▲0.1381.94 ▼15.22
Media Library /wp-admin/upload.php3.36 ▲0.1432.22 ▲0.88
Top25 Social Icons /wp-admin/options-general.php?page=top25-social-icons3.4334.00

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 288 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_top25-social-icons

Browser metrics Passed 4 tests

Checking browser requirements for Top 25 Social Icons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.39 ▲0.141.84 ▲0.1426.84 ▼20.47
Dashboard /wp-admin2,210 ▲305.56 ▲0.0281.19 ▼17.7642.80 ▼1.23
Posts /wp-admin/edit.php2,115 ▲182.14 ▲0.1334.14 ▼1.5638.35 ▲4.79
Add New Post /wp-admin/post-new.php1,540 ▲1422.94 ▼0.23642.49 ▼14.6054.93 ▼1.93
Media Library /wp-admin/upload.php1,412 ▲94.22 ▲0.0496.84 ▼2.2043.81 ▼2.31
Top25 Social Icons /wp-admin/options-general.php?page=top25-social-icons1,0332.0023.9333.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_top25-social-icons
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/top-25-social-icons/lite.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/top-25-social-icons/admin/widget.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/top-25-social-icons/admin/options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === top-25-social-icons === )
  • Screenshots: These screenshots require images: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png)
Please take inspiration from this readme.txt

top-25-social-icons/lite.php 85% from 13 tests

The primary PHP file in "Top 25 Social Icons" version 3.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("top-25-social-icons.php" instead of "lite.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 475 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,665 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
CSS264551,074
PHP313531584
JavaScript1347

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity8.25
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
235 PNG files occupy 0.80MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/circle/Forrst.png2.51KB1.68KB▼ 32.80%
images/square/twitter.png1.32KB1.30KB▼ 1.77%
images/circle/deviantart.png3.67KB0.81KB▼ 77.94%
images/circle48/forrst.png5.14KB1.89KB▼ 63.28%
images/kite/tumblr.png4.39KB1.43KB▼ 67.49%