84% github-badge

Code Review | GitHub Badge

WordPress plugin GitHub Badge scored84%from 54 tests.

About plugin

  • Plugin page: github-badge
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-4.9
  • WordPress version: 6.3.1
  • First release: Jan 18, 2013
  • Latest release: Mar 24, 2018
  • Number of updates: 15
  • Update frequency: every 126.1 days
  • Top authors: graphicedit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

A check of server-side resources used by GitHub Badge
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.10 ▼7.24
Dashboard /wp-admin3.31 ▲0.0144.84 ▼2.80
Posts /wp-admin/edit.php3.36 ▲0.0044.10 ▼2.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.33 ▼5.73
Media Library /wp-admin/upload.php3.23 ▲0.0038.73 ▲3.88

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for GitHub Badge
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.22 ▼1.372.03 ▲0.1540.11 ▼2.87
Dashboard /wp-admin2,211 ▲564.85 ▼0.83101.64 ▼0.3540.25 ▼1.84
Posts /wp-admin/edit.php2,094 ▲52.00 ▲0.0135.67 ▼3.0329.56 ▼6.06
Add New Post /wp-admin/post-new.php1,531 ▼1123.34 ▲5.29660.69 ▲44.4949.64 ▼3.26
Media Library /wp-admin/upload.php1,390 ▼14.29 ▲0.1395.05 ▼4.5940.75 ▼1.96

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× 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/github-badge/github-badge.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
7 plugin tags: badge, pages, short code, posts, github...

github-badge/github-badge.php Passed 13 tests

"GitHub Badge" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
93 characters long description:
This plug-in allows you to create and place a GitHub css3 badge to your webpage on wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected41 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS12029
PHP1122212

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin