10% twitterply-for-webmasters

Code Review | Twitterply

WordPress plugin Twitterply scored10%from 54 tests.

About plugin

  • Plugin page: twitterply-for-we...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 22, 2014
  • Latest release: Apr 7, 2014
  • Number of updates: 4
  • Update frequency: every 11.0 days
  • Top authors: iwebslogtech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,242 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/twitterply-for-webmasters/twitterply.php+572
    Function create_function() is deprecated

Server metrics [RAM: ▼1.81MB] [CPU: ▼56.96ms] Passed 4 tests

Analyzing server-side resources used by Twitterply
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.296.43 ▼33.82
Dashboard /wp-admin2.19 ▼1.118.36 ▼40.60
Posts /wp-admin/edit.php2.19 ▼1.167.77 ▼45.83
Add New Post /wp-admin/post-new.php2.19 ▼3.697.90 ▼107.58
Media Library /wp-admin/upload.php2.19 ▼1.0310.38 ▼28.17
Twitter Feed /wp-admin/options-general.php?page=twitterply2.197.55

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
twitterply_settings
widget_recent-comments
db_upgraded
widget_theysaidso_widget
twitterply_version
widget_twitterplywidget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Twitterply
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.20 ▼0.081.65 ▲0.0043.52 ▼2.10
Dashboard /wp-admin2,199 ▲195.63 ▼0.0688.08 ▲3.2441.90 ▼4.25
Posts /wp-admin/edit.php2,101 ▲11.96 ▲0.0134.36 ▼5.2936.28 ▼5.35
Add New Post /wp-admin/post-new.php1,529 ▲323.56 ▲0.30636.30 ▼35.7550.57 ▼6.06
Media Library /wp-admin/upload.php1,401 ▲14.18 ▲0.01101.05 ▼16.4143.66 ▼5.50
Twitter Feed /wp-admin/options-general.php?page=twitterply1,0172.1423.1927.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/twitterply-for-webmasters/twitterply.php+572
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_twitterplywidget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=twitterply
    • > Deprecated in wp-content/plugins/twitterply-for-webmasters/twitterply.php+572
    Function create_function() is deprecated

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/twitterply-for-webmasters/includes/Twitter/connect.php
    • > /wp-content/plugins/twitterply-for-webmasters/includes/Twitter/clearsessions.php
    • > /wp-content/plugins/twitterply-for-webmasters/includes/Twitter/test.php
    • > /wp-content/plugins/twitterply-for-webmasters/includes/Twitter/callback.php
    • > /wp-content/plugins/twitterply-for-webmasters/includes/Twitter/index.php
    • > /wp-content/plugins/twitterply-for-webmasters/includes/Twitter/redirect.php
  • 17× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined index: oauth_token in wp-content/plugins/twitterply-for-webmasters/includes/Twitter/twitteroauth/twitteroauth.php on line 118
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/twitterply-for-webmasters/twitterply.php:35
    • > PHP Notice
      Undefined index: oauth_verifier in wp-content/plugins/twitterply-for-webmasters/includes/Twitter/callback.php on line 23
    • > PHP Notice
      Undefined index: access_token in wp-content/plugins/twitterply-for-webmasters/includes/Twitter/test.php on line 17
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/twitterply-for-webmasters/includes/Twitter/test.php on line 20
    • > PHP Notice
      Undefined index: oauth_token_secret in wp-content/plugins/twitterply-for-webmasters/includes/Twitter/redirect.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/twitterply-for-webmasters/includes/Twitter/index.php on line 20
    • > PHP Notice
      Undefined index: oauth_token in wp-content/plugins/twitterply-for-webmasters/includes/Twitter/callback.php on line 20
    • > PHP Notice
      Undefined index: access_token in wp-content/plugins/twitterply-for-webmasters/includes/Twitter/index.php on line 17
    • > PHP Notice
      Undefined index: oauth_token in wp-content/plugins/twitterply-for-webmasters/includes/Twitter/twitteroauth/twitteroauth.php on line 82

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (2.) image required
The official readme.txt might help

twitterply-for-webmasters/twitterply.php 85% from 13 tests

"Twitterply" version 1.2'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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("twitterply-for-webmasters.php" instead of "twitterply.php")
  • Description: The description should be shorter than 140 characters (currently 152 characters long)

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
There were no executable files found in this plugin1,285 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP113936491,285

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.07
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes214.29%
▷ Concrete classes1285.71%
▷ Final classes00.00%
Methods101
▷ Static methods1514.85%
▷ Public methods8988.12%
▷ Protected methods21.98%
▷ Private methods109.90%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/Twitter/images/lighter.png2.43KB1.77KB▼ 27.11%
includes/Twitter/images/darker.png2.31KB1.70KB▼ 26.41%