10% the-twitter-profile

Code Review | The Twitter Profile

WordPress plugin The Twitter Profile scored10%from 54 tests.

About plugin

  • Plugin page: the-twitter-profile
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-4.6
  • WordPress version: 6.3.1
  • First release: Jun 18, 2015
  • Latest release: Aug 28, 2016
  • Number of updates: 24
  • Update frequency: every 18.2 days
  • Top authors: Alobaidi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /3,133 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/the-twitter-profile/widget.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; WPTimeTwitterProfileWidget has a deprecated constructor

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

An overview of server-side resources used by The Twitter Profile
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.346.47 ▼33.88
Dashboard /wp-admin2.15 ▼1.168.03 ▼47.85
Posts /wp-admin/edit.php2.15 ▼1.218.06 ▼45.18
Add New Post /wp-admin/post-new.php2.15 ▼3.747.96 ▼97.83
Media Library /wp-admin/upload.php2.15 ▼1.086.82 ▼30.70
Twitter Profile /wp-admin/plugins.php?page=WPTime_twitter_profile_settings2.157.56

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_wptimetwitterprofilewidget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for The Twitter Profile
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.43 ▼1.158.92 ▲7.0543.86 ▲5.11
Dashboard /wp-admin2,196 ▲225.60 ▼0.0092.36 ▼0.8942.18 ▼1.90
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0138.57 ▲0.7237.57 ▲3.29
Add New Post /wp-admin/post-new.php1,548 ▲1923.15 ▲5.59610.62 ▼104.2058.73 ▲10.21
Media Library /wp-admin/upload.php1,401 ▲14.31 ▼0.0399.90 ▼2.0743.15 ▼2.97
Twitter Profile /wp-admin/plugins.php?page=WPTime_twitter_profile_settings1,0822.0524.1338.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
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/the-twitter-profile/widget.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; WPTimeTwitterProfileWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_wptimetwitterprofilewidget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/plugins.php?page=WPTime_twitter_profile_settings
    • > Deprecated in wp-content/plugins/the-twitter-profile/widget.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; WPTimeTwitterProfileWidget has a deprecated constructor
    • > GET request to /wp-admin/plugins.php?page=WPTime_twitter_profile_settings
    • > Deprecated in wp-content/plugins/the-twitter-profile/widget.php+476
    Function create_function() is deprecated

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
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/the-twitter-profile/widget.php
    • > /wp-content/plugins/the-twitter-profile/the-twitter-profile.php
    • > /wp-content/plugins/the-twitter-profile/Alobaidi.TwitterOAuth.php
    • > /wp-content/plugins/the-twitter-profile/settings.php
    • > /wp-content/plugins/the-twitter-profile/uninstall.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 30 tag instead of maximum 10
The official readme.txt might help

the-twitter-profile/the-twitter-profile.php 92% from 13 tests

"The Twitter Profile" version 1.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,045 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP616836656
CSS36725368
SVG10015
JavaScript1636

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity71.00
▷ Minimum class complexity71.00
▷ Maximum class complexity71.00
Average method complexity18.50
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/verified_icon.png2.94KB1.83KB▼ 37.86%
images/buy_button.png5.47KB1.99KB▼ 63.57%