10% tweettee

Code Review | Tweettee

WordPress plugin Tweettee scored 10% from 54 tests.

About plugin

  • Plugin page: tweettee
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1.1
  • WordPress version: 5.8.1
  • First release: May 4, 2015
  • Latest release: Apr 12, 2019
  • Number of updates: 5
  • Update frequency: every 288.0 days
  • Top authors: wladweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 512 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/tweettee/src/Includes/Core/Builders/TweetteeBuilderMain.php+24
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.05MB] [CPU: ▼139.99ms] Passed 4 tests

This is a short check of server-side resources used by Tweettee
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0436.90 ▲1.44
Dashboard /wp-admin3.16 ▲0.1148.98 ▲0.42
Posts /wp-admin/edit.php3.21 ▲0.1042.75 ▲0.15
Add New Post /wp-admin/post-new.php5.46 ▲0.0290.52 ▼557.49
Media Library /wp-admin/upload.php3.04 ▲0.0430.51 ▼3.02
Tweettee /wp-admin/options-general.php?page=tweettee3.1328.10

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 87 new files
Database: 1 new table, 2 new options
New tables
wp_tweettee_cache
New WordPress options
tweettee
widget_tweettee_plugin

Browser metrics Passed 4 tests

An overview of browser requirements for Tweettee
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,827 ▲23316.38 ▲0.9115.00 ▲5.8847.40 ▲0.53
Dashboard /wp-admin2,972 ▲395.89 ▼0.10138.84 ▼7.84117.00 ▲1.92
Posts /wp-admin/edit.php2,744 ▲52.70 ▲0.0170.13 ▲2.6580.44 ▼8.81
Add New Post /wp-admin/post-new.php1,878 ▲37819.16 ▲0.57346.99 ▼13.57109.48 ▼9.13
Media Library /wp-admin/upload.php1,815 ▲85.04 ▲0.02154.91 ▲15.96122.15 ▲14.23
Tweettee /wp-admin/options-general.php?page=tweettee1,1322.3354.2565.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_tweettee_plugin

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/tweettee/src/Includes/Core/Builders/tpl/good_template.php
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\Config' not found in wp-content/plugins/tweettee/vendor/abraham/twitteroauth/src/TwitterOAuth.php:16
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/tweettee/src/Includes/Core/Builders/tpl/good_template.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tweettee/src/Includes/Core/TweetteeWidget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/tweettee/vendor/abraham/twitteroauth/tests/Util/JsonDecoderTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/tweettee/vendor/abraham/twitteroauth/tests/AbstractSignatureMethodTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\Tests\\AbstractSignatureMethodTest' not found in wp-content/plugins/tweettee/vendor/abraham/twitteroauth/tests/HmacSha1Test.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Wladweb\\Tweettee\\Includes\\Core\\Builders\\TweetteeBuilder' not found in wp-content/plugins/tweettee/src/Includes/Core/Builders/TweetteeBuilderWidget.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Wladweb\\Tweettee\\Includes\\Core\\I\\SessionInterface' not found in wp-content/plugins/tweettee/src/Includes/TweetteeSession.php:10
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/tweettee/vendor/abraham/twitteroauth/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/tweettee/vendor/abraham/twitteroauth/tests/bootstrap.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/tweettee/src/Includes/Core/Builders/tpl/good_template.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Tweettee settings.), #2 (Widget.), #3 (Block in home page.)
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

tweettee/tweettee_bootstrap.php 77% from 13 tests

The primary PHP file in "Tweettee" version 1.1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 221 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("tweettee.php" instead of "tweettee_bootstrap.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin3,837 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
PHP556751,3223,093
CSS2686303
JSON300114
JavaScript226398
PO File1365198
Markdown536078
XML22123
YAML10017
Bourne Shell14013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.49
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces13
Interfaces3
Traits0
Classes40
▷ Abstract classes37.50%
▷ Concrete classes3792.50%
▷ Final classes00.00%
Methods265
▷ Static methods259.43%
▷ Public methods19874.72%
▷ Protected methods155.66%
▷ Private methods5219.62%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants17
▷ Global constants847.06%
▷ Class constants952.94%
▷ Public constants9100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
src/Includes/Core/Builders/tpl/images/language.png3.75KB2.83KB▼ 24.50%