10% eewee-twitter-hovercard

Code Review | eewee twitter hovercard

WordPress plugin eewee twitter hovercard scored 10% from 54 tests.

About plugin

  • Plugin page: eewee-twitter-hov...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.0
  • WordPress version: 5.8.1
  • First release: Dec 13, 2012
  • Latest release: Sep 5, 2014
  • Number of updates: 6
  • Update frequency: every 105.2 days
  • Top authors: eewee (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 934 total downloads

Benchmarks

Plugin footprint 58% 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 cannot be installed
    • > Warning in wp-content/plugins/eewee-twitter-hovercard/controllers/EeweeTwitterHovercard.php+2
    Use of undefined constant EeweeTwitterHovercard - assumed 'EeweeTwitterHovercard' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.86MB] [CPU: ▼186.25ms] Passed 4 tests

Analyzing server-side resources used by eewee twitter hovercard
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.77 ▼1.076.23 ▼27.75
Dashboard /wp-admin1.79 ▼1.279.67 ▼34.59
Posts /wp-admin/edit.php1.79 ▼1.326.15 ▼36.63
Add New Post /wp-admin/post-new.php1.79 ▼3.656.06 ▼646.01
Media Library /wp-admin/upload.php1.79 ▼1.216.07 ▼24.41
Manual /wp-admin/admin.php?page=idSousMenuTH21.796.04
Eewee Twitter Hovercard /wp-admin/admin.php?page=idEeweeTwitterHovercard1.795.70
Setting /wp-admin/admin.php?page=idSousMenuTH11.796.20

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

eewee twitter hovercard: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲12715.96 ▲0.459.00 ▼2.8945.50 ▲1.84
Dashboard /wp-admin3,003 ▲695.93 ▼0.28139.10 ▼37.17122.59 ▲12.65
Posts /wp-admin/edit.php2,794 ▲552.70 ▼0.0262.97 ▼4.0686.58 ▼3.81
Add New Post /wp-admin/post-new.php1,527 ▼15618.52 ▲0.25396.06 ▼12.94110.93 ▲2.33
Media Library /wp-admin/upload.php1,791 ▼165.01 ▼0.02137.08 ▼24.05133.96 ▲19.08
Manual /wp-admin/admin.php?page=idSousMenuTH21,2372.0959.7575.73
Eewee Twitter Hovercard /wp-admin/admin.php?page=idEeweeTwitterHovercard1,0402.0652.8456.99
Setting /wp-admin/admin.php?page=idSousMenuTH11,2612.1050.8161.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/eewee-twitter-hovercard/controllers/EeweeTwitterHovercard.php+2
    Use of undefined constant EeweeTwitterHovercard - assumed 'EeweeTwitterHovercard' (this will throw an Error in a future version of PHP)

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuTH1
    • > Warning in wp-content/plugins/eewee-twitter-hovercard/controllers/EeweeTwitterHovercard.php+2
    Use of undefined constant EeweeTwitterHovercard - assumed 'EeweeTwitterHovercard' (this will throw an Error in a future version of PHP)
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuTH1
    • > Notice in wp-content/plugins/eewee-twitter-hovercard/controllers/EeweeTwitterHovercard.php+126
    Undefined property: EeweeTwitterHovercard::$adminOptionsName
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuTH1
    • > Warning in wp-content/plugins/eewee-twitter-hovercard/controllers/EeweeTwitterHovercard.php+30
    Use of undefined constant menu - assumed 'menu' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuTH1
    • > Warning in wp-content/plugins/eewee-twitter-hovercard/controllers/EeweeTwitterHovercard.php+32
    Use of undefined constant sousMenu1 - assumed 'sousMenu1' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuTH1
    • > Warning in wp-content/plugins/eewee-twitter-hovercard/controllers/EeweeTwitterHovercard.php+33
    Use of undefined constant sousMenu2 - assumed 'sousMenu2' (this will throw an Error in a future version of PHP)

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/eewee-twitter-hovercard/view/manual.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'form_add_twitterHovercard' not found in wp-content/plugins/eewee-twitter-hovercard/view/twitterhovercard.php:17
    • > PHP Warning
      include(): Failed opening 'EEWEE_TWITTERHOVERCARD_PLUGIN_DIR/view/twitterhovercard.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/eewee-twitter-hovercard/view/root.php on line 8
    • > PHP Warning
      Use of undefined constant EeweeTwitterHovercard - assumed 'EeweeTwitterHovercard' (this will throw an Error in a future version of PHP) in wp-content/plugins/eewee-twitter-hovercard/controllers/EeweeTwitterHovercard.php on line 2
    • > 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-twitter-hovercard/index.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/eewee-twitter-hovercard/index.php:18
    • > PHP Notice
      Undefined index: type in wp-content/plugins/eewee-twitter-hovercard/view/root.php on line 3
    • > PHP Warning
      include(EEWEE_TWITTERHOVERCARD_PLUGIN_DIR/view/twitterhovercard.php): failed to open stream: No such file or directory in wp-content/plugins/eewee-twitter-hovercard/view/root.php on line 8
    • > PHP Warning
      Use of undefined constant EEWEE_TWITTERHOVERCARD_PLUGIN_DIR - assumed 'EEWEE_TWITTERHOVERCARD_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/eewee-twitter-hovercard/view/root.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuTH1
    • > Network (severe)
    wp-content/plugins/eewee_twitter_card/css/themes/base/jquery.ui.all.css?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Profil twitter.) image missing
Please take inspiration from this readme.txt

eewee-twitter-hovercard/index.php 85% from 13 tests

"eewee twitter hovercard" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 305 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("eewee-twitter-hovercard.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
Everything looks great! No dangerous files found in this plugin350 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP671105258
PO File1458492
CSS1010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity7.00
▷ Minimum class complexity5.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.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

It is recommended to compress PNG files in your plugin to 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.png0.59KB0.47KB▼ 20.56%