68% quote-tweet

Code Review | Quote Tweet

WordPress plugin Quote Tweet scored68%from 54 tests.

About plugin

  • Plugin page: quote-tweet
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Nov 25, 2014
  • Latest release: Nov 21, 2017
  • Number of updates: 23
  • Update frequency: every 47.5 days
  • Top authors: bozdoz (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /3,503 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.25ms] Passed 4 tests

Server-side resources used by Quote Tweet
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.33 ▼0.40
Dashboard /wp-admin3.32 ▲0.0246.58 ▼5.48
Posts /wp-admin/edit.php3.38 ▲0.0247.83 ▲1.02
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.69 ▼17.01
Media Library /wp-admin/upload.php3.25 ▲0.0235.91 ▼2.11
Quote Tweet /wp-admin/options-general.php?page=quote-tweet3.2233.29

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Quote Tweet
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.73 ▲0.202.01 ▲0.4245.76 ▲3.34
Dashboard /wp-admin2,199 ▲225.58 ▲0.0196.36 ▲5.7838.80 ▼7.91
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0239.72 ▲3.0334.52 ▼2.85
Add New Post /wp-admin/post-new.php1,531 ▲223.04 ▼0.67633.22 ▼7.2350.39 ▼0.63
Media Library /wp-admin/upload.php1,398 ▲14.21 ▲0.01100.95 ▼7.1043.76 ▼1.63
Quote Tweet /wp-admin/options-general.php?page=quote-tweet8262.0326.2529.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/quote-tweet/quote-tweet.php+54
    Use of undefined constant delete_option - assumed 'delete_option' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/quote-tweet/admin/admin.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/quote-tweet/admin/admin.php on line 57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quote-tweet/quote-tweet.php:30

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: text selection, social media, tweet, share, twitter

quote-tweet/quote-tweet.php Passed 13 tests

The entry point to "Quote Tweet" version 0.7 is a PHP file that has certain tags in its header comment area
47 characters long description:
A plugin for quickly tweeting a text selection.

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
Good job! No executable or dangerous file extensions detected387 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP33020154
CSS2101117
JavaScript126198
Markdown110018

PHP code Passed 2 tests

Analyzing 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.47
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/twitter_logo_sm.png0.67KB0.80KB0.00%
images/twitter_logo_sm_retina.png15.15KB1.22KB▼ 91.92%