83% wp-showgithubfile

Code Review | wp-ShowGithubFile

WordPress plugin wp-ShowGithubFile scored83%from 54 tests.

About plugin

  • Plugin page: wp-showgithubfile
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Jun 13, 2020
  • Latest release: Jun 27, 2020
  • Number of updates: 8
  • Update frequency: every 2.1 days
  • Top authors: ninethsense (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /359 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.09ms] Passed 4 tests

Server-side resources used by wp-ShowGithubFile
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.23 ▼5.30
Dashboard /wp-admin3.31 ▲0.0045.82 ▼10.56
Posts /wp-admin/edit.php3.36 ▲0.0048.63 ▲0.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.73 ▼11.22
Media Library /wp-admin/upload.php3.23 ▲0.0034.79 ▼5.28

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

wp-ShowGithubFile: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.67 ▼0.721.54 ▼0.4439.33 ▼4.37
Dashboard /wp-admin2,206 ▲215.89 ▲1.00104.79 ▼21.7438.59 ▼9.72
Posts /wp-admin/edit.php2,089 ▼02.15 ▲0.1839.30 ▼3.2935.04 ▼4.02
Add New Post /wp-admin/post-new.php1,514 ▼1917.52 ▼5.88660.21 ▲13.2365.11 ▲3.86
Media Library /wp-admin/upload.php1,388 ▲34.23 ▲0.0496.35 ▼22.6241.89 ▼6.05

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 does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 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/wp-showgithubfile/wp-ShowGithubFile.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Donate link: Invalid URI found ("-")
  • Screenshots: Screenshot #1 (This screen shot description corresponds to screenshot.png.) image missing
The official readme.txt is a good inspiration

wp-showgithubfile/wp-ShowGithubFile.php 92% from 13 tests

The entry point to "wp-ShowGithubFile" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-showgithubfile.php" instead of "wp-ShowGithubFile.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected34 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1141034

PHP code Passed 2 tests

An short overview of 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.33
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.07MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-1.png69.87KB0.00KB▼ 100.00%