71% twitchers

Code Review | Twitchers

WordPress plugin Twitchers scored71%from 54 tests.

About plugin

  • Plugin page: twitchers
  • Plugin version: 2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6.0
  • WordPress version: 6.3.1
  • First release: Aug 25, 2012
  • Latest release: Aug 22, 2013
  • Number of updates: 37
  • Update frequency: every 9.8 days
  • Top authors: ypraise (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼1.11ms] Passed 4 tests

A check of server-side resources used by Twitchers
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.50 ▼0.99
Dashboard /wp-admin3.43 ▲0.1345.27 ▼0.93
Posts /wp-admin/edit.php3.54 ▲0.1949.31 ▼1.30
Add New Post /wp-admin/post-new.php6.01 ▲0.1297.40 ▼1.22
Media Library /wp-admin/upload.php3.35 ▲0.1235.17 ▲1.94
Twitchers /wp-admin/options-general.php?page=twitchers3.2932.51

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Twitchers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲15714.76 ▲0.1134.13 ▲32.3544.25 ▲3.16
Dashboard /wp-admin2,210 ▲255.05 ▼0.8398.56 ▼2.7239.70 ▼8.03
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0150.24 ▼0.0745.59 ▲6.72
Add New Post /wp-admin/post-new.php1,531 ▼218.42 ▼4.87613.51 ▼44.6055.97 ▲2.14
Media Library /wp-admin/upload.php1,395 ▲74.21 ▲0.00100.50 ▼2.8242.51 ▼2.56
Twitchers /wp-admin/options-general.php?page=twitchers9242.0523.3330.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twitchers
    • > Notice in wp-content/plugins/twitchers/twitcher.php+170
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=twitchers
    • > Warning in wp-content/plugins/twitchers/twitcher.php+170
    in_array() expects parameter 2 to be array, null given

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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/twitchers/admin/twitcher-ajax.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/twitchers/class-twitcher.php:336
    • > PHP Fatal error
      Uncaught Error: Class 'twitcher_Manager' not found in wp-content/plugins/twitchers/admin/twitcher-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/twitchers/twitcher.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Contributors not specified
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (The map displaying on a page.), #2 (The contributor form that is presented to visitors when clicking on add contribution.)
Please take inspiration from this readme.txt

twitchers/twitcher.php 85% from 13 tests

The main file in "Twitchers" v. 2.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("twitchers.php" instead of "twitcher.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 184 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
Everything looks great! No dangerous files found in this plugin2,291 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4966411,035
PHP4274130934
CSS24013322

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 1.00MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/error.png0.59KB0.64KB0.00%
images/red-marker.png1.44KB0.99KB▼ 31.64%
images/orange-marker.png1.34KB0.96KB▼ 28.60%
images/marker-shadow.png1.42KB0.75KB▼ 47.05%
images/dgrey-marker.png1.19KB0.88KB▼ 25.37%