78% socials-ga

Code Review | GAPlugins - Socials

WordPress plugin GAPlugins - Socials scored78%from 54 tests.

About plugin

  • Plugin page: socials-ga
  • Plugin version: 0.01.00.01
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5
  • WordPress version: 6.3.1
  • First release: May 18, 2020
  • Latest release: Feb 8, 2021
  • Number of updates: 19
  • Update frequency: every 14.0 days
  • Top authors: gautierantoine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /531 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▲1.42ms] Passed 4 tests

An overview of server-side resources used by GAPlugins - Socials
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1747.81 ▲5.21
Dashboard /wp-admin3.52 ▲0.1756.57 ▼6.65
Posts /wp-admin/edit.php3.63 ▲0.2759.32 ▲8.70
Add New Post /wp-admin/post-new.php6.10 ▲0.21100.31 ▼1.17
Media Library /wp-admin/upload.php3.44 ▲0.2144.51 ▲8.29
Share /wp-admin/admin.php?page=gap-admin-page-share3.4139.18
Follow /wp-admin/admin.php?page=gap-admin-page-follow3.4139.43
GAPlugin /wp-admin/admin.php?page=gap-admin-page3.4138.28

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 8 new options
New WordPress options
gap_follow
db_upgraded
theysaidso_admin_options
gap_share
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for GAPlugins - Socials
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.23 ▼0.111.80 ▲0.2436.78 ▼4.13
Dashboard /wp-admin2,218 ▲405.55 ▼0.1784.52 ▼28.4172.63 ▲31.67
Posts /wp-admin/edit.php2,132 ▲351.96 ▼0.0740.22 ▲3.4438.14 ▼0.76
Add New Post /wp-admin/post-new.php1,566 ▲4023.15 ▼0.31697.15 ▲7.6158.46 ▼0.08
Media Library /wp-admin/upload.php1,432 ▲294.16 ▼0.06107.43 ▲1.9270.21 ▲23.48
Share /wp-admin/admin.php?page=gap-admin-page-share1,0161.9537.6143.85
Follow /wp-admin/admin.php?page=gap-admin-page-follow1,1982.2935.1035.26
GAPlugin /wp-admin/admin.php?page=gap-admin-page8182.0024.2729.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • gap_follow

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/socials-ga/gaplugin-socials-plugin.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'GAPlugin\\AdminSocials' not found in wp-content/plugins/socials-ga/includes/Follow.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GAPlugin\\AdminSocials' not found in wp-content/plugins/socials-ga/includes/Share.php:10

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: instagram, facebook, socials, navigation, multisite...

socials-ga/gaplugin-socials-plugin.php 85% from 13 tests

The main PHP file in "GAPlugins - Socials" ver. 0.01.00.01 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("socials-ga.php" instead of "gaplugin-socials-plugin.php")

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
Everything looks great! No dangerous files found in this plugin898 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP455194494
CSS22021317
PO File1192446
Markdown111030
SVG1006
JavaScript1015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity19.33
▷ Minimum class complexity9.00
▷ Maximum class complexity25.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods2793.10%
▷ Public methods2793.10%
▷ Protected methods26.90%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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