62% twitter-slm

Code Review | Twitter SLM

WordPress plugin Twitter SLM scored62%from 54 tests.

About plugin

  • Plugin page: twitter-slm
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Mar 16, 2015
  • Latest release: Mar 17, 2015
  • Number of updates: 9
  • Update frequency: every 0.3 days
  • Top authors: drmaxim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /984 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.72ms] Passed 4 tests

An overview of server-side resources used by Twitter SLM
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.46 ▼0.44
Dashboard /wp-admin3.32 ▼0.0243.17 ▼24.26
Posts /wp-admin/edit.php3.43 ▲0.0846.28 ▲2.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.72 ▼16.51
Media Library /wp-admin/upload.php3.24 ▲0.0235.45 ▲3.82
Twitter SLM /wp-admin/options-general.php?page=slm-twitter3.4033.41

Server storage [IO: ▲0.30MB] [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: 26 new files
Database: 1 new table, 6 new options
New tables
wp_maxv_social_accounts_log
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Twitter SLM
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.171.67 ▼0.0941.44 ▼5.98
Dashboard /wp-admin2,204 ▲165.82 ▼0.07111.31 ▼6.3938.52 ▼4.26
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0139.28 ▼0.0734.67 ▲0.51
Add New Post /wp-admin/post-new.php1,545 ▲2618.30 ▼4.91608.19 ▼32.8059.27 ▲4.65
Media Library /wp-admin/upload.php1,395 ▲134.19 ▼0.0096.69 ▼1.9543.70 ▼1.16
Twitter SLM /wp-admin/options-general.php?page=slm-twitter1,7612.0438.1638.06

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
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_maxv_social_accounts_log
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=slm-twitter
    • > Notice in wp-content/plugins/twitter-slm/ui/SLMTwitterOptionsUI.php+126
    Undefined index: share_use_backlinksindexer
    • > GET request to /wp-admin/options-general.php?page=slm-twitter
    • > Notice in wp-content/plugins/twitter-slm/ui/SLMTwitterOptionsUI.php+131
    Undefined index: share_use_backlinksindexer_key

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 fix the following
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/twitter-slm/js/index.php
    • > /wp-content/plugins/twitter-slm/css/index.php
    • > /wp-content/plugins/twitter-slm/ui/index.php
    • > /wp-content/plugins/twitter-slm/img/index.php
    • > /wp-content/plugins/twitter-slm/index.php
    • > /wp-content/plugins/twitter-slm/OAuth/index.php
    • > /wp-content/plugins/twitter-slm/utils/index.php
    • > /wp-content/plugins/twitter-slm/data/index.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/twitter-slm/SLMTwitterPlugin.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 30 tag instead of maximum 10
The official readme.txt might help

twitter-slm/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Twitter SLM" version 0.1.0
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("twitter-slm.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected9,178 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS228826,461
PHP123293481,818
JavaScript36153899

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.94
▷ Minimum class complexity1.00
▷ Maximum class complexity92.00
Average method complexity3.66
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes316.67%
▷ Concrete classes1583.33%
▷ Final classes00.00%
Methods118
▷ Static methods2218.64%
▷ Public methods10185.59%
▷ Protected methods21.69%
▷ Private methods1512.71%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
img/plugin.png3.46KB0.82KB▼ 76.31%