77% simpletwit

Code Review | SimpleTwit

WordPress plugin SimpleTwit scored77%from 54 tests.

About plugin

  • Plugin page: simpletwit
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 11, 2013
  • Latest release: Oct 17, 2014
  • Number of updates: 18
  • Update frequency: every 25.7 days
  • Top authors: GYatesIII (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,502 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼4.28ms] Passed 4 tests

Analyzing server-side resources used by SimpleTwit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2443.99 ▼2.14
Dashboard /wp-admin63.64 ▲60.2912,464,226.24 ▲12,464,168.54
Posts /wp-admin/edit.php3.70 ▲0.3051.96 ▼3.83
Add New Post /wp-admin/post-new.php6.17 ▲0.2496.76 ▼12.09
Media Library /wp-admin/upload.php3.51 ▲0.2441.44 ▲0.92
Twitter Feed /wp-admin/options-general.php?page=stf-twit-feed3.4733.75

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 11 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
stf_auth_creds
theysaidso_admin_options
widget_recent-comments
stf_last_tweet
widget_stf_widget
stf_creds_info
stf_twit
widget_recent-posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for SimpleTwit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲1614.23 ▼0.001.66 ▼0.4039.10 ▼4.24
Dashboard /wp-admin2,205 ▲285.57 ▼0.0287.82 ▼4.5845.24 ▼3.34
Posts /wp-admin/edit.php2,111 ▲112.00 ▲0.0037.65 ▲1.4335.11 ▼0.38
Add New Post /wp-admin/post-new.php1,538 ▲1223.78 ▲0.21664.19 ▼72.5168.40 ▼2.69
Media Library /wp-admin/upload.php1,413 ▲134.17 ▼0.0898.56 ▼11.7146.23 ▲0.68
Twitter Feed /wp-admin/options-general.php?page=stf-twit-feed8392.0126.5330.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 11 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • stf_creds_info
    • stf_twit
    • widget_stf_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • stf_last_tweet
    • ...

Smoke tests 50% 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)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=stf-twit-feed
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=stf-twit-feed
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=stf-twit-feed
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=stf-twit-feed
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simpletwit/lib/stf-tweet-post-type.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simpletwit/lib/stf-tweet-post-type.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simpletwit/options-page.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simpletwit/widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/simpletwit/views/options-template.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Donate link: Invalid URI ("")
The official readme.txt might help

simpletwit/simple-twit.php 85% from 13 tests

The main PHP file in "SimpleTwit" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simpletwit.php" instead of "simple-twit.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 427 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,294 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92164491,143
Markdown1370125
JSON10026

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity35.00
▷ Minimum class complexity8.00
▷ Maximum class complexity66.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods45
▷ Static methods920.00%
▷ Public methods2862.22%
▷ Protected methods00.00%
▷ Private methods1737.78%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected