78% gitsyllabus

Code Review | GitSyllabus

WordPress plugin GitSyllabus scored78%from 54 tests.

About plugin

  • Plugin page: gitsyllabus
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 5, 2013
  • Latest release: Jun 5, 2013
  • Number of updates: 4
  • Update frequency: every 3.5 days
  • Top authors: emaclab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /886 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.56MB] [CPU: ▼16.56ms] Passed 4 tests

Server-side resources used by GitSyllabus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1341.83 ▼0.42
Dashboard /wp-admin3.43 ▲0.1349.39 ▼5.13
Posts /wp-admin/edit.php3.54 ▲0.1953.67 ▲2.79
Add New Post /wp-admin/post-new.php3.27 ▼2.6138.48 ▼59.40
Media Library /wp-admin/upload.php3.35 ▲0.1236.17 ▼1.30
All Syllabi /wp-admin/edit.php?post_type=gitsyllabus_syllabus3.3937.80
Add New /wp-admin/post-new.php?post_type=gitsyllabus_syllabus3.2735.21
GitSyllabus /wp-admin/options-general.php?page=git-syllabus3.3034.46

Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/gitsyllabus/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for GitSyllabus
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲12613.70 ▼0.662.07 ▲0.3044.61 ▲0.01
Dashboard /wp-admin2,265 ▲624.96 ▼0.90106.31 ▼5.0740.45 ▼1.24
Posts /wp-admin/edit.php2,144 ▲442.10 ▲0.0939.75 ▲4.0333.58 ▼1.30
Add New Post /wp-admin/post-new.php1,552 ▲1218.40 ▲0.19663.66 ▲24.0753.08 ▼17.97
Media Library /wp-admin/upload.php1,444 ▲444.24 ▲0.08108.08 ▲7.3248.84 ▼0.52
All Syllabi /wp-admin/edit.php?post_type=gitsyllabus_syllabus1,1052.0036.0029.54
Add New /wp-admin/post-new.php?post_type=gitsyllabus_syllabus1,5742.6456.3857.17
GitSyllabus /wp-admin/options-general.php?page=git-syllabus8421.9124.4225.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=gitsyllabus_syllabus
    • > Notice in wp-content/plugins/gitsyllabus/gitsyllabus.php+120
    Undefined index: gitsyllabus_nonce
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=git-syllabus
    • > Notice in wp-content/plugins/gitsyllabus/gitsyllabus.php+335
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=git-syllabus
    • > Notice in wp-content/plugins/gitsyllabus/gitsyllabus.php+321
    Undefined index: code

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
Please fix the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gitsyllabus/gitsyllabus.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gitsyllabus/gitsyllabus.php:22
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHWPINC/class-http.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/gitsyllabus/gitsyllabus.php on line 16
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/gitsyllabus/gitsyllabus.php on line 16
    • > PHP Warning
      include_once(ABSPATHWPINC/class-http.php): failed to open stream: No such file or directory in wp-content/plugins/gitsyllabus/gitsyllabus.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === gitsyllabus === )
You can take inspiration from this readme.txt

gitsyllabus/gitsyllabus.php Passed 13 tests

The main PHP file in "GitSyllabus" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
53 characters long description:
A tool to move syllabus data from WordPress to GitHub

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected657 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP422280642
Markdown22015

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.50
▷ Minimum class complexity4.00
▷ Maximum class complexity17.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
No PNG files were detected