83% rtsocial

Code Review | rtSocial

WordPress plugin rtSocial scored83%from 54 tests.

About plugin

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active /27,233 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼0.31ms] 75% from 4 tests

This is a short check of server-side resources used by rtSocial
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 3,321.27ms on /wp-admin/options-general.php?page=rtsocial-options)
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1539.37 ▼3.40
Dashboard /wp-admin3.44 ▲0.1446.29 ▼1.01
Posts /wp-admin/edit.php3.56 ▲0.2050.02 ▲2.94
Add New Post /wp-admin/post-new.php6.03 ▲0.1495.81 ▲9.01
Media Library /wp-admin/upload.php3.37 ▲0.1435.10 ▲0.24
rtSocial Options /wp-admin/options-general.php?page=rtsocial-options4.873,321.27

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
rtsocial_plugin_options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for rtSocial
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲23413.68 ▼0.5411.40 ▲9.4439.57 ▼8.39
Dashboard /wp-admin2,213 ▲255.85 ▲0.77105.52 ▼8.4340.84 ▼7.41
Posts /wp-admin/edit.php2,093 ▲71.99 ▼0.0140.18 ▲3.4436.08 ▲0.34
Add New Post /wp-admin/post-new.php6,239 ▲4,70526.07 ▲2.83807.46 ▲114.1656.36 ▲1.73
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.0393.95 ▼5.2942.13 ▼3.51
rtSocial Options /wp-admin/options-general.php?page=rtsocial-options1,7545.80100.77116.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rtsocial/source.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/rtsocial/template/rtsocial-setting-form.php:10

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 86% 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 your attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

rtsocial/source.php 77% from 13 tests

The main PHP file in "rtSocial" ver. 2.2.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 163 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rtsocial.php" instead of "source.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,769 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP21992141,343
CSS18441272
JavaScript11541129
PO File14425

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/rtsocial-sprite-image.png54.62KB16.97KB▼ 68.92%
images/default-pinterest.png4.30KB2.94KB▼ 31.69%
images/btowp_img.png3.94KB1.87KB▼ 52.64%