84% galdget

Code Review | Galdget

WordPress plugin Galdget scored84%from 54 tests.

About plugin

  • Plugin page: galdget
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-4.9
  • WordPress version: 6.3.1
  • First release: Aug 7, 2017
  • Latest release: Nov 9, 2017
  • Number of updates: 8
  • Update frequency: every 12.0 days
  • Top authors: unforget (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /902 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.21MB] [CPU: ▼3.05ms] Passed 4 tests

This is a short check of server-side resources used by Galdget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2245.74 ▲5.88
Dashboard /wp-admin3.52 ▲0.1844.37 ▼16.87
Posts /wp-admin/edit.php3.64 ▲0.2849.12 ▲5.93
Add New Post /wp-admin/post-new.php6.11 ▲0.2292.22 ▼5.57
Media Library /wp-admin/upload.php3.45 ▲0.2136.17 ▲4.38
Galdget /wp-admin/options-general.php?page=galdget-settings3.4735.20

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 11 new options
New WordPress options
theysaidso_admin_options
galdget-urls
widget_recent-posts
widget_recent-comments
galdget-urls1
db_upgraded
galdget-urls2
galdget-version
widget_theysaidso_widget
can_compress_scripts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Galdget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲14313.58 ▼1.014.99 ▲3.4338.85 ▼5.60
Dashboard /wp-admin2,213 ▲244.86 ▼0.08109.04 ▼10.5939.70 ▼6.21
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0639.21 ▲5.8635.06 ▼3.35
Add New Post /wp-admin/post-new.php6,315 ▲4,79621.82 ▼1.38856.11 ▲186.3159.33 ▲1.70
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.1298.40 ▲3.2541.56 ▼1.46
Galdget /wp-admin/options-general.php?page=galdget-settings1,5303.1244.8935.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_galdget_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/galdget/galdget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

galdget/galdget.php 92% from 13 tests

The main file in "Galdget" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Everything looks great! No dangerous files found in this plugin2,074 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21360857
PHP19821673
PO File19496216
CSS2150194
HTML3110134

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity190.00
▷ Minimum class complexity190.00
▷ Maximum class complexity190.00
Average method complexity24.62
▷ Minimum method complexity1.00
▷ Maximum method complexity100.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods450.00%
▷ Protected methods00.00%
▷ Private methods450.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin