78% ghactivity

Code Review | GHActivity

WordPress plugin GHActivity scored78%from 54 tests.

About plugin

  • Plugin page: ghactivity
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.8
  • WordPress version: 6.3.1
  • First release: Mar 29, 2016
  • Latest release: Jun 1, 2017
  • Number of updates: 11
  • Update frequency: every 39.5 days
  • Top authors: jeherve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /972 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.48ms] Passed 4 tests

Server-side resources used by GHActivity
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1045.42 ▲6.23
Dashboard /wp-admin3.39 ▲0.0953.86 ▲7.86
Posts /wp-admin/edit.php3.44 ▲0.0945.31 ▼5.90
Add New Post /wp-admin/post-new.php6.16 ▲0.2787.28 ▼7.65
Media Library /wp-admin/upload.php3.31 ▲0.0937.42 ▲1.40
Repo /wp-admin/edit-tags.php?taxonomy=ghactivity_repo&post_type=ghactivity_event3.3145.20
Person /wp-admin/edit-tags.php?taxonomy=ghactivity_actor&post_type=ghactivity_event3.3134.74
Add New /wp-admin/post-new.php?post_type=ghactivity_event6.1584.39
Event Type /wp-admin/edit-tags.php?taxonomy=ghactivity_event_type&post_type=ghactivity_event3.3134.20
GitHub Activity Settings /wp-admin/options-general.php?page=ghactivity3.2932.03
All GitHub Events /wp-admin/edit.php?post_type=ghactivity_event3.3639.27

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_ghactivity_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for GHActivity
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲4914.28 ▼0.281.81 ▼0.1343.53 ▲1.81
Dashboard /wp-admin2,235 ▲585.64 ▼0.0396.16 ▲5.4743.42 ▼0.53
Posts /wp-admin/edit.php2,143 ▲431.98 ▼0.0534.95 ▼3.4634.02 ▼7.41
Add New Post /wp-admin/post-new.php1,570 ▲3918.22 ▼4.92649.72 ▼2.0165.87 ▼4.86
Media Library /wp-admin/upload.php1,440 ▲434.17 ▼0.0399.32 ▼7.2643.13 ▼1.62
Repo /wp-admin/edit-tags.php?taxonomy=ghactivity_repo&post_type=ghactivity_event1,2892.1228.0331.35
Person /wp-admin/edit-tags.php?taxonomy=ghactivity_actor&post_type=ghactivity_event1,2862.1227.5230.26
Add New /wp-admin/post-new.php?post_type=ghactivity_event6,22022.08823.1429.36
Event Type /wp-admin/edit-tags.php?taxonomy=ghactivity_event_type&post_type=ghactivity_event1,2862.1229.3530.40
GitHub Activity Settings /wp-admin/options-general.php?page=ghactivity9032.0737.0533.06
All GitHub Events /wp-admin/edit.php?post_type=ghactivity_event1,1401.9833.0432.97

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_ghactivity_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 7× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ghactivity/charts.ghactivity.php
    • > /wp-content/plugins/ghactivity/cpt.ghactivity.php
    • > /wp-content/plugins/ghactivity/core.ghactivity.php
    • > /wp-content/plugins/ghactivity/admin.ghactivity.php
    • > /wp-content/plugins/ghactivity/ghactivity.php
    • > /wp-content/plugins/ghactivity/widget.ghactivity.php
    • > /wp-content/plugins/ghactivity/reports.ghactivity.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ghactivity/shortcode.ghactivity.php:6

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: tracking, github, productivity

ghactivity/ghactivity.php 92% from 13 tests

"GHActivity" version 1.5.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,181 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP82215171,035
CSS257118
JavaScript321327
Markdown1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity19.80
▷ Minimum class complexity3.00
▷ Maximum class complexity57.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods30
▷ Static methods930.00%
▷ Public methods2480.00%
▷ Protected methods00.00%
▷ Private methods620.00%
Functions23
▷ Named functions2295.65%
▷ Anonymous functions14.35%
Constants2
▷ Global constants2100.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 were not PNG files found in your plugin