81% twitchers

Code Review | Twitchers

WordPress plugin Twitchers scored 81% 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: 5.9.2
  • 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 / 1,944 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼303.63ms] Passed 4 tests

Server-side resources used by Twitchers
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.1962.67 ▲8.17
Dashboard /wp-admin3.54 ▲0.1337.98 ▼2.20
Posts /wp-admin/edit.php3.77 ▲0.1342.52 ▲2.04
Add New Post /wp-admin/post-new.php7.01 ▲0.04102.45 ▼1,203.80
Media Library /wp-admin/upload.php3.42 ▲0.1227.36 ▼10.55
Twitchers /wp-admin/options-general.php?page=twitchers3.3725.84

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Twitchers
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,925 ▲17117.33 ▲1.5520.18 ▲13.993.31 ▲0.50
Dashboard /wp-admin2,897 ▲396.14 ▼0.01118.78 ▼14.84157.73 ▼3.96
Posts /wp-admin/edit.php2,693 ▲23.23 ▼0.0063.51 ▲0.20144.76 ▲2.59
Add New Post /wp-admin/post-new.php1,664 ▼8817.48 ▼4.12410.73 ▼52.35158.67 ▼0.62
Media Library /wp-admin/upload.php1,700 ▲55.51 ▲0.03144.41 ▲2.00186.93 ▼11.19
Twitchers /wp-admin/options-general.php?page=twitchers1,1792.3757.63139.53

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

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
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 | 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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/twitchers/admin/twitcher-ajax.php
  • 3× PHP files trigger server errors when accessed directly:
    • > 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 add_shortcode() in wp-content/plugins/twitchers/class-twitcher.php:336
    • > 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
There were no browser issues found


Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors not specified
  • Screenshots: 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.)
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

twitchers/twitcher.php 85% from 13 tests

This is the main PHP file of "Twitchers" version 2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("twitchers.php" instead of "twitcher.php")
  • Description: The description should be shorter than 140 characters (currently 184 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,291 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
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
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods216.67%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
▷ Named functions9100.00%
▷ Anonymous functions00.00%
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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/blue-marker.png1.31KB1.07KB▼ 18.06%
images/marker-shadow.png1.42KB0.75KB▼ 47.05%
images/red-marker.png1.44KB0.99KB▼ 31.64%
images/lgreen-marker.png1.47KB0.97KB▼ 33.56%
images/success.png0.69KB0.65KB▼ 5.24%