84% gitstatuspress

Code Review | GitStatusPress

WordPress plugin GitStatusPress scored84%from 54 tests.

About plugin

  • Plugin page: gitstatuspress
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.7
  • WordPress version: 6.3.1
  • First release: Dec 13, 2016
  • Latest release: Dec 22, 2016
  • Number of updates: 14
  • Update frequency: every 2.2 days
  • Top authors: kmgalanakis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /564 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.81ms] Passed 4 tests

This is a short check of server-side resources used by GitStatusPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.70 ▼0.73
Dashboard /wp-admin3.38 ▲0.0345.63 ▼21.95
Posts /wp-admin/edit.php3.49 ▲0.1343.19 ▲1.93
Add New Post /wp-admin/post-new.php5.98 ▲0.0978.42 ▼10.50
Media Library /wp-admin/upload.php3.30 ▲0.0735.78 ▲3.98

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
gitstatuspress_plugins_git

Browser metrics Passed 4 tests

This is an overview of browser requirements for GitStatusPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.53 ▼1.148.64 ▲6.7241.34 ▼5.61
Dashboard /wp-admin2,224 ▲364.85 ▼0.96100.97 ▼18.8842.87 ▼5.31
Posts /wp-admin/edit.php2,107 ▲182.00 ▼0.0335.94 ▲1.8531.67 ▼0.92
Add New Post /wp-admin/post-new.php1,526 ▲723.44 ▲0.18648.72 ▲53.3751.12 ▼9.91
Media Library /wp-admin/upload.php1,403 ▲124.23 ▼0.04104.32 ▲5.3045.13 ▲0.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • gitstatuspress_plugins_git

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gitstatuspress/admin/partials/gitstatuspress-admin-display.php
    • > /wp-content/plugins/gitstatuspress/public/partials/gitstatuspress-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 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
7 plugin tags: plugins, version, last pulled, branch, git...

gitstatuspress/gitstatuspress.php Passed 13 tests

The entry point to "GitStatusPress" version 1.0.1 is a PHP file that has certain tags in its header comment area
139 characters long description:
Get an Admin Toolbar menu that contains all the installed plugin that are installed using git along with relevant information for each one.

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
Good job! No executable or dangerous file extensions detected364 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13185583334
CSS26824
JavaScript24546

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.62
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods2980.56%
▷ Protected methods00.00%
▷ Private methods719.44%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin