83% twitter-intents

Code Review | Twitter Intents

WordPress plugin Twitter Intents scored83%from 54 tests.

About plugin

  • Plugin page: twitter-intents
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Jun 23, 2014
  • Latest release: Jun 23, 2014
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: m1ck3y (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /661 total downloads

Benchmarks

Plugin footprint 83% 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: ▼3.21ms] Passed 4 tests

Server-side resources used by Twitter Intents
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.83 ▼2.05
Dashboard /wp-admin3.33 ▲0.0243.27 ▼7.02
Posts /wp-admin/edit.php3.38 ▲0.0246.67 ▼1.32
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.58 ▲0.98
Media Library /wp-admin/upload.php3.25 ▲0.0231.47 ▼2.45

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Twitter Intents
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.25 ▼1.131.67 ▼0.2541.47 ▼4.30
Dashboard /wp-admin2,209 ▲244.87 ▼1.01112.24 ▲7.6341.71 ▼3.89
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.1639.48 ▼0.4534.64 ▲1.98
Add New Post /wp-admin/post-new.php6,240 ▲4,72121.67 ▼1.17837.00 ▲158.8560.71 ▲2.71
Media Library /wp-admin/upload.php1,388 ▼04.30 ▲0.0594.89 ▼1.0443.72 ▲0.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/twitter-intents/twitter.intents.php:125

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (After Publishing your post and tweeting a link to it. Copy the tweet ID.), #2 (Paste it in your edit post / page screen.), #3 (Check the bottom of your post / page!)
You can take inspiration from this readme.txt

twitter-intents/twitter.intents.php 92% from 13 tests

Analyzing the main PHP file in "Twitter Intents" version 0.1.0
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("twitter-intents.php" instead of "twitter.intents.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin109 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2263173
CSS18036

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.71MB with 0.49MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png205.40KB55.85KB▼ 72.81%
images/sprite.png2.79KB1.07KB▼ 61.78%
screenshot-2.png277.13KB83.03KB▼ 70.04%
screenshot-3.png237.60KB70.11KB▼ 70.49%