72% barebones-twitter

Code Review | Barebones Twitter

WordPress plugin Barebones Twitter scored72%from 54 tests.

About plugin

  • Plugin page: barebones-twitter
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 16, 2016
  • Latest release: Mar 16, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: aaronfisher (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /806 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.09ms] Passed 4 tests

Analyzing server-side resources used by Barebones Twitter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.59 ▼1.44
Dashboard /wp-admin3.45 ▲0.1550.65 ▼4.93
Posts /wp-admin/edit.php3.57 ▲0.2152.03 ▲1.80
Add New Post /wp-admin/post-new.php6.05 ▲0.1788.81 ▼7.78
Media Library /wp-admin/upload.php3.38 ▲0.1539.46 ▲1.97
Barebones Twitter /wp-admin/options-general.php?page=barebones-twitter3.3434.10

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Barebones Twitter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14213.83 ▼0.8010.05 ▲8.2043.88 ▲0.06
Dashboard /wp-admin2,203 ▲265.55 ▲0.0292.74 ▼8.4340.33 ▼2.30
Posts /wp-admin/edit.php2,108 ▲82.02 ▲0.0539.22 ▲3.2335.14 ▲2.56
Add New Post /wp-admin/post-new.php1,533 ▲723.30 ▼0.30652.67 ▼81.2865.13 ▲5.55
Media Library /wp-admin/upload.php1,408 ▲84.20 ▲0.0894.56 ▼13.2144.36 ▼0.79
Barebones Twitter /wp-admin/options-general.php?page=barebones-twitter9142.1222.8030.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

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
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=barebones-twitter
    • > Warning in wp-admin/includes/template.php+1771
    call_user_func() expects parameter 1 to be a valid callback, class 'Barebones_Twitter_Admin' does not have a method 'barebones_twitter_access_cb'

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/barebones-twitter/public/partials/barebones-twitter-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/barebones-twitter/admin/partials/barebones-twitter-admin-display.php:19

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (This is the settings menu), #2 (Tweets being displayed on the front end (non scroll))
  • Plugin Name: Please specify the plugin name on the first line ( === barebones-twitter === )
The official readme.txt is a good inspiration

barebones-twitter/barebones-twitter.php Passed 13 tests

"Barebones Twitter" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
63 characters long description:
Easily add a barebones Twitter widget to your Wordpress website

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
Success! There were no dangerous files found in this plugin630 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13196743612
JavaScript263018
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.12
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity1.84
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods49
▷ Static methods24.08%
▷ Public methods4183.67%
▷ Protected methods00.00%
▷ Private methods816.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin