84% repo-widget

Code Review | Repo Widget

WordPress plugin Repo Widget scored 84% from 54 tests.

About plugin

  • Plugin page: repo-widget
  • Plugin version: 0.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: May 2, 2013
  • Latest release: May 3, 2013
  • Number of updates: 14
  • Update frequency: every 14.7 days
  • Top authors: allejo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 876 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Repo Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0629.09 ▼22.46
Dashboard /wp-admin3.32 ▲0.0245.20 ▼0.89
Posts /wp-admin/edit.php3.37 ▲0.0246.99 ▼4.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.65 ▼17.36
Media Library /wp-admin/upload.php3.24 ▲0.0237.61 ▲1.39

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Repo Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲12713.82 ▼0.825.22 ▲2.9141.89 ▼2.95
Dashboard /wp-admin2,200 ▲95.84 ▼0.0699.60 ▼11.9041.07 ▼2.96
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0641.47 ▲0.5134.50 ▼1.06
Add New Post /wp-admin/post-new.php1,533 ▼923.46 ▲5.20628.55 ▼25.1153.51 ▼10.82
Media Library /wp-admin/upload.php1,391 ▲64.24 ▼0.0798.01 ▼5.2244.73 ▲0.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/repo-widget/repo-widget.php:106

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: widget, github, repo

repo-widget/repo-widget.php Passed 13 tests

The entry point to "Repo Widget" version 0.7.0 is a PHP file that has certain tags in its header comment area
70 characters long description:
Allows you to insert general GitHub repo information with a short code

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin240 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS1190143
PHP1151084
JavaScript12013

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png32.14KB12.79KB▼ 60.20%