10% show-repos

Code Review | Show Repos

WordPress plugin Show Repos scored10%from 54 tests.

About plugin

  • Plugin page: show-repos
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: May 15, 2020
  • Latest release: May 30, 2020
  • Number of updates: 6
  • Update frequency: every 2.7 days
  • Top authors: joytou (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /440 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'SHOW_REPOS' does not have a method 'activate'

Server metrics [RAM: ▲0.10MB] [CPU: ▲0.44ms] Passed 4 tests

Analyzing server-side resources used by Show Repos
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.84 ▼0.22
Dashboard /wp-admin3.41 ▲0.1057.34 ▲3.70
Posts /wp-admin/edit.php3.52 ▲0.1653.65 ▲2.83
Add New Post /wp-admin/post-new.php5.99 ▲0.10101.45 ▲0.64
Media Library /wp-admin/upload.php3.33 ▲0.1040.63 ▼1.50
Show Repos /wp-admin/options-general.php?page=show-repos3.3036.37

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

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

Browser metrics Passed 4 tests

Show Repos: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.34 ▲0.061.70 ▲0.0443.00 ▲0.74
Dashboard /wp-admin2,202 ▲245.62 ▲0.0393.08 ▼14.3139.79 ▼4.94
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0142.18 ▲4.6635.74 ▲1.63
Add New Post /wp-admin/post-new.php1,529 ▲323.07 ▼0.74675.47 ▼25.7153.14 ▲4.23
Media Library /wp-admin/upload.php1,398 ▲14.16 ▼0.1099.24 ▼3.5743.34 ▲1.26
Show Repos /wp-admin/options-general.php?page=show-repos8201.9927.7925.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'SHOW_REPOS' does not have a method 'deactivate'
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • show_repos_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/show-repos/show-repos.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: git, github, repository, gitee

show-repos/show-repos.php Passed 13 tests

The main PHP script in "Show Repos" version 1.1.3 is automatically included on every request by WordPress
62 characters long description:
Show your repo(s) on the wordpress through a simple shortcode.

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
No dangerous file extensions were detected803 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP337160406
CSS200259
HTML20076
PO File1141662

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.67
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods1588.24%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants14
▷ Global constants1392.86%
▷ Class constants17.14%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected