10% eewee-flattr

Code Review | eewee flattr

WordPress plugin eewee flattr scored10%from 54 tests.

About plugin

  • Plugin page: eewee-flattr
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.0
  • WordPress version: 6.3.1
  • First release: Jan 5, 2013
  • Latest release: Sep 5, 2014
  • Number of updates: 8
  • Update frequency: every 76.0 days
  • Top authors: eewee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,591 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/eewee-flattr/controllers/EeweeFlattr.php+2
    Use of undefined constant EeweeFlattr - assumed 'EeweeFlattr' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.93MB] [CPU: ▼51.84ms] Passed 4 tests

Analyzing server-side resources used by eewee flattr
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.61 ▼39.20
Dashboard /wp-admin2.09 ▼1.265.63 ▼52.60
Posts /wp-admin/edit.php2.09 ▼1.276.13 ▼39.42
Add New Post /wp-admin/post-new.php2.09 ▼3.805.94 ▼76.14
Media Library /wp-admin/upload.php2.09 ▼1.145.20 ▼29.70
Eewee Flattr /wp-admin/admin.php?page=idEeweeFlattr2.095.54
Manual /wp-admin/admin.php?page=idSousMenuFlattr2.097.37

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for eewee flattr
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9213.26 ▼1.421.82 ▲0.1143.59 ▼1.45
Dashboard /wp-admin2,243 ▲555.86 ▲0.01101.81 ▼17.5378.59 ▲35.60
Posts /wp-admin/edit.php2,120 ▲312.03 ▲0.0134.96 ▼2.6329.56 ▼5.64
Add New Post /wp-admin/post-new.php1,696 ▲18222.18 ▲4.66793.66 ▲154.2258.78 ▲6.61
Media Library /wp-admin/upload.php1,422 ▲374.16 ▼0.0298.59 ▼1.0446.20 ▲3.96
Eewee Flattr /wp-admin/admin.php?page=idEeweeFlattr7952.0223.8822.56
Manual /wp-admin/admin.php?page=idSousMenuFlattr9041.8624.2335.55

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
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/eewee-flattr/controllers/EeweeFlattr.php+2
    Use of undefined constant EeweeFlattr - assumed 'EeweeFlattr' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuFlattr
    • > Warning in wp-content/plugins/eewee-flattr/controllers/EeweeFlattr.php+2
    Use of undefined constant EeweeFlattr - assumed 'EeweeFlattr' (this will throw an Error in a future version of PHP)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuFlattr
    • > Notice in wp-content/plugins/eewee-flattr/controllers/EeweeFlattr.php+117
    Undefined property: EeweeFlattr::$adminOptionsName
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuFlattr
    • > Warning in wp-content/plugins/eewee-flattr/controllers/EeweeFlattr.php+30
    Use of undefined constant menu - assumed 'menu' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuFlattr
    • > Warning in wp-content/plugins/eewee-flattr/controllers/EeweeFlattr.php+32
    Use of undefined constant sousMenu1 - assumed 'sousMenu1' (this will throw an Error in a future version of PHP)

SRP 0% 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/eewee-flattr/view/manual.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/eewee-flattr/index.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'form_add_twitterCard' not found in wp-content/plugins/eewee-flattr/view/flattr.php:14
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/eewee-flattr/index.php on line 18
    • > PHP Warning
      Use of undefined constant EeweeFlattr - assumed 'EeweeFlattr' (this will throw an Error in a future version of PHP) in wp-content/plugins/eewee-flattr/controllers/EeweeFlattr.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuFlattr
    • > Network (severe)
    wp-content/plugins/eewee_flattr/css/style.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuFlattr
    • > Network (severe)
    wp-content/plugins/eewee_flattr/img/icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=idSousMenuFlattr
    • > Network (severe)
    https://tools.flattr.net/widgets/thing.html?thing=1090157 - Failed to load resource: the server responded with a status of 502 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (Code QR.) image required
Please take inspiration from this readme.txt

eewee-flattr/index.php 92% from 13 tests

This is the main PHP file of "eewee flattr" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("eewee-flattr.php" instead of "index.php")

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
No dangerous file extensions were detected169 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP45281149
PO File1295820
CSS1010

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon.png3.44KB0.99KB▼ 71.23%