10% fossin-badge

Code Review | Foss.in Badge

WordPress plugin Foss.in Badge scored10%from 54 tests.

About plugin

  • Plugin page: fossin-badge
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 10, 2012
  • Latest release: Nov 10, 2012
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: sudar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /890 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/fossin-badge/fossin-badge.php+95
    Methods with the same name as their class will not be constructors in a future version of PHP; FossInBadgeWidget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼55.10ms] Passed 4 tests

A check of server-side resources used by Foss.in Badge
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.66 ▼40.02
Dashboard /wp-admin2.10 ▼1.215.98 ▼46.49
Posts /wp-admin/edit.php2.10 ▼1.265.87 ▼40.84
Add New Post /wp-admin/post-new.php2.10 ▼3.798.36 ▼93.05
Media Library /wp-admin/upload.php2.10 ▼1.135.49 ▼34.85

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_fossin-badge
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Foss.in Badge
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.31 ▼1.494.12 ▲1.9739.64 ▼9.45
Dashboard /wp-admin2,203 ▲185.79 ▼0.0994.56 ▼10.6539.98 ▼4.57
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0338.99 ▲0.8834.74 ▲0.22
Add New Post /wp-admin/post-new.php1,533 ▲1923.31 ▲5.91660.02 ▼39.1155.52 ▼15.43
Media Library /wp-admin/upload.php1,391 ▲34.18 ▲0.0795.39 ▼24.3146.05 ▼1.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/fossin-badge/fossin-badge.php+95
    Methods with the same name as their class will not be constructors in a future version of PHP; FossInBadgeWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_fossin-badge
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 fix 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 plugin_dir_url() in wp-content/plugins/fossin-badge/fossin-badge.php:20

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 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: sidebar, badge, fossin

fossin-badge/fossin-badge.php Passed 13 tests

The main file in "Foss.in Badge" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
65 characters long description:
Helps you to display the Foss.in Badge in your WordPress website.

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
Success! There were no dangerous files found in this plugin102 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13154102

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity2.50
▷ Minimum class complexity2.00
▷ Maximum class complexity3.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.30MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/foss.in.2012.png15.71KB7.02KB▼ 55.29%
images/banner-480.png53.99KB34.13KB▼ 36.78%
images/attending_250px.png61.27KB23.98KB▼ 60.86%
images/banner-816.png112.52KB90.30KB▼ 19.74%
images/show_me_the_code.png35.72KB15.49KB▼ 56.64%