57% fetlife

Code Review | WP-FetLife

WordPress plugin WP-FetLife scored57%from 54 tests.

About plugin

  • Plugin page: fetlife
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2015
  • Latest release: Jan 11, 2015
  • Number of updates: 21
  • Update frequency: every 0.1 days
  • Top authors: meitar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /962 total downloads

Benchmarks

Plugin footprint 48% 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.05MB] [CPU: ▼3.33ms] Passed 4 tests

Server-side resources used by WP-FetLife
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.65 ▲4.36
Dashboard /wp-admin3.35 ▲0.0446.43 ▼5.00
Posts /wp-admin/edit.php3.46 ▲0.1147.44 ▼1.75
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.22 ▼9.73
Media Library /wp-admin/upload.php3.27 ▲0.0437.44 ▲3.16
WP-FetLife /wp-admin/options-general.php?page=wp_fetlife_settings3.2130.94
WP-FetLife Cache /wp-admin/tools.php?page=wp_fetlife_cache3.2330.56

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_wp_fl_wdgt_participants
widget_wp_fl_wdgt_groups
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_wp_fl_wdgt_events

Browser metrics Passed 4 tests

WP-FetLife: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.17 ▼1.211.84 ▲0.0743.61 ▼2.32
Dashboard /wp-admin2,214 ▲264.85 ▼0.06107.46 ▼6.9538.70 ▼8.30
Posts /wp-admin/edit.php2,094 ▲52.02 ▼0.0335.39 ▼3.5133.41 ▼0.36
Add New Post /wp-admin/post-new.php1,548 ▲2918.56 ▼4.57599.83 ▼75.0352.72 ▲3.70
Media Library /wp-admin/upload.php1,393 ▲24.21 ▲0.05100.65 ▲4.4242.46 ▲0.20
WP-FetLife /wp-admin/options-general.php?page=wp_fetlife_settings8732.0521.5231.32
WP-FetLife Cache /wp-admin/tools.php?page=wp_fetlife_cache7742.0224.1929.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Error in wp-content/plugins/fetlife/uninstall.php+22
    Uncaught Error: Call to private method WP_FetLife_Plugin::clearCachedTransients() from context '' in wp-content/plugins/fetlife/uninstall.php:22
    Stack trace:
    #0 wp-admin/includes/plugin.php(1245): include_once()
    #1 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • This plugin has failed uninstalling correctly, leaving 12 files (0.10MB) in the plugin directory
    • (new file) widgets/WPFetLifeProfileEventsWidget.php
    • (new file) widgets/WPFetLifeProfileWidget.php
    • (new file) widgets/WPFetLifeProfileGroupsWidget.php
    • (new file) lib/FetLife/FetLife.php
    • (new file) widgets/WPFetLifeWidget.php
    • (new file) widgets/WPFetLifeEventParticipantsWidget.php
    • (new file) languages/wp-fetlife.pot
    • (new file) readme.txt
    • (new file) widgets/WPFetLifeEventWidget.php
    • (new file) uninstall.php
    • ...
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wp_fetlife_settings
    • > Notice in wp-content/plugins/fetlife/wp-fetlife.php+307
    Undefined index: fetlife_username
    • > GET request to /wp-admin/options-general.php?page=wp_fetlife_settings
    • > Notice in wp-content/plugins/fetlife/wp-fetlife.php+318
    Undefined index: fetlife_password

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
Almost there! Just fix the following items
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/fetlife/widgets/WPFetLifeWidget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_FetLife_Widget' not found in wp-content/plugins/fetlife/widgets/WPFetLifeProfileWidget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_FetLife_Event_Widget' not found in wp-content/plugins/fetlife/widgets/WPFetLifeEventParticipantsWidget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_FetLife_Profile_Widget' not found in wp-content/plugins/fetlife/widgets/WPFetLifeProfileEventsWidget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_FetLife_Profile_Widget' not found in wp-content/plugins/fetlife/widgets/WPFetLifeProfileGroupsWidget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_FetLife_Widget' not found in wp-content/plugins/fetlife/widgets/WPFetLifeEventWidget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/fetlife/widgets/WPFetLifeWidget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/fetlife/widgets/WPFetLifeWidget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === fetlife === )
Please take inspiration from this readme.txt

fetlife/wp-fetlife.php 77% from 13 tests

Analyzing the main PHP file in "WP-FetLife" version 0.1.1
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 455 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("fetlife.php" instead of "wp-fetlife.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,576 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP101774111,576

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity10.11
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes421.05%
▷ Concrete classes1578.95%
▷ Final classes00.00%
Methods129
▷ Static methods00.00%
▷ Public methods9674.42%
▷ Protected methods129.30%
▷ Private methods2116.28%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ 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
PNG images were not found in this plugin