88% project-sync-for-github

Code Review | Project Sync for Github

WordPress plugin Project Sync for Github scored 88% from 54 tests.

About plugin

  • Plugin page: project-sync-for-...
  • Plugin version: 0.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.9.8
  • WordPress version: 5.8.1
  • First release: Sep 25, 2018
  • Latest release: Sep 25, 2018
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: fullstackdigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 418 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.48MB] [CPU: ▼141.85ms] 75% from 4 tests

An overview of server-side resources used by Project Sync for Github
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 2,185.27ms on /wp-admin/options-general.php?page=gitget)
PageMemory (MB)CPU Time (ms)
Home /3.33 ▲0.5039.76 ▲13.39
Dashboard /wp-admin3.58 ▲0.5251.96 ▲5.97
Posts /wp-admin/edit.php3.63 ▲0.5147.81 ▼7.97
Add New Post /wp-admin/post-new.php5.88 ▲0.4589.62 ▼566.43
Media Library /wp-admin/upload.php3.46 ▲0.4637.89 ▲1.03
Project Categories /wp-admin/edit-tags.php?taxonomy=gitget_categories&post_type=gitget_project3.4636.75
All Projects /wp-admin/edit.php?post_type=gitget_project3.5637.33
Project Sync for Github /wp-admin/options-general.php?page=gitget3.532,185.27
Languages /wp-admin/edit-tags.php?taxonomy=gitget_languages&post_type=gitget_project3.4534.56
Add New Project /wp-admin/post-new.php?post_type=gitget_project3.70168.59
Project Tags /wp-admin/edit-tags.php?taxonomy=gitget_tags&post_type=gitget_project3.4541.62

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 60 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Project Sync for Github
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,765 ▲12816.27 ▲0.869.74 ▼1.3546.33 ▼0.37
Dashboard /wp-admin3,014 ▲805.89 ▼0.06143.46 ▼9.06124.40 ▲9.15
Posts /wp-admin/edit.php2,794 ▲552.60 ▼0.1262.18 ▼1.5091.22 ▼1.49
Add New Post /wp-admin/post-new.php1,718 ▲10318.73 ▼2.68419.89 ▲111.40106.13 ▼1.29
Media Library /wp-admin/upload.php1,802 ▼55.01 ▼0.01136.09 ▼27.13144.69 ▲34.45
Project Categories /wp-admin/edit-tags.php?taxonomy=gitget_categories&post_type=gitget_project1,8112.3958.6882.21
All Projects /wp-admin/edit.php?post_type=gitget_project1,4652.6263.6876.69
Project Sync for Github /wp-admin/options-general.php?page=gitget1,1592.0953.3982.53
Languages /wp-admin/edit-tags.php?taxonomy=gitget_languages&post_type=gitget_project1,7802.4066.3879.91
Add New Project /wp-admin/post-new.php?post_type=gitget_project4,0259.29249.77191.51
Project Tags /wp-admin/edit-tags.php?taxonomy=gitget_tags&post_type=gitget_project1,7802.3959.9982.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/project-sync-for-github/vendor/michelf/php-markdown/Readme.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/project-sync-for-github/gitget.php:641
    • > PHP Fatal error
      Uncaught Error: Class 'FSD_DATA_SYNC' not found in wp-content/plugins/project-sync-for-github/data-sync.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Michelf\\Markdown' not found in wp-content/plugins/project-sync-for-github/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Michelf\\MarkdownInterface' not found in wp-content/plugins/project-sync-for-github/vendor/michelf/php-markdown/Michelf/Markdown.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

project-sync-for-github/gitget.php 92% from 13 tests

The main file in "Project Sync for Github" v. 0.3.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("project-sync-for-github.php" instead of "gitget.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
No dangerous file extensions were detected11,674 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP238972,4924,518
SVG3004,065
JavaScript33422371,898
CSS68941780
Markdown31320318
JSON30095

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity29.44
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes15
▷ Abstract classes213.33%
▷ Concrete classes1386.67%
▷ Final classes00.00%
Methods204
▷ Static methods3416.67%
▷ Public methods9345.59%
▷ Protected methods10450.98%
▷ Private methods73.43%
Functions13
▷ Named functions17.69%
▷ Anonymous functions1292.31%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/img/default-project-image.png2.56KB1.51KB▼ 41.07%
lib/img/fa-github.png0.52KB0.55KB0.00%
lib/img/fsd-logo.png21.44KB10.37KB▼ 51.65%