84% latest-tweets-obvs

Code Review | Latest Tweets Obvs

WordPress plugin Latest Tweets Obvs scored 84% from 54 tests.

About plugin

  • Plugin page: latest-tweets-obvs
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 6.3.1
  • First release: Apr 25, 2017
  • Latest release: Feb 3, 2021
  • Number of updates: 17
  • Update frequency: every 81.2 days
  • Top authors: jasewarner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 920 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.12MB] [CPU: ▼2.72ms] Passed 4 tests

Analyzing server-side resources used by Latest Tweets Obvs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.61 ▼10.76
Dashboard /wp-admin3.42 ▲0.1248.14 ▲0.58
Posts /wp-admin/edit.php3.54 ▲0.1849.90 ▼1.14
Add New Post /wp-admin/post-new.php6.00 ▲0.1295.36 ▲0.43
Media Library /wp-admin/upload.php3.35 ▲0.1236.90 ▲1.42
Latest Tweets Obvs /wp-admin/options-general.php?page=latest-tweets-obvs-settings3.3232.05

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Latest Tweets Obvs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.45 ▼0.362.31 ▲0.2537.99 ▼0.56
Dashboard /wp-admin2,210 ▲195.87 ▲0.97108.48 ▼2.4142.97 ▲1.46
Posts /wp-admin/edit.php2,096 ▲42.04 ▼0.0140.85 ▼2.9537.93 ▲0.26
Add New Post /wp-admin/post-new.php1,537 ▲1823.21 ▲0.17602.55 ▼74.6650.74 ▼1.62
Media Library /wp-admin/upload.php1,392 ▲44.26 ▲0.06102.14 ▼4.4742.96 ▼0.28
Latest Tweets Obvs /wp-admin/options-general.php?page=latest-tweets-obvs-settings1,1082.0434.2038.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require(wp-content/plugins/latest-tweets-obvs/public/vendor/twitteroauth/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/latest-tweets-obvs/public/vendor/twitteroauth/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\SignatureMethod' not found in wp-content/plugins/latest-tweets-obvs/public/vendor/twitteroauth/src/HmacSha1.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/latest-tweets-obvs/admin/partials/latest-tweets-obvs-admin-page-settings.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/latest-tweets-obvs/public/vendor/twitteroauth/tests/TwitterOAuthTest.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/latest-tweets-obvs/admin/partials/latest-tweets-obvs-admin-field-text.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/latest-tweets-obvs/public/partials/latest-tweets-obvs-public-display.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/latest-tweets-obvs/admin/partials/latest-tweets-obvs-admin-section-account.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/latest-tweets-obvs/public/vendor/twitteroauth/tests/TokenTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/latest-tweets-obvs/public/vendor/twitteroauth/tests/Util/JsonDecoderTest.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/latest-tweets-obvs/admin/partials/latest-tweets-obvs-admin-section-api.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === latest-tweets-obvs === )
The official readme.txt is a good inspiration

latest-tweets-obvs/latest-tweets-obvs.php Passed 13 tests

The main PHP file in "Latest Tweets Obvs" ver. 1.0.7 adds more information about the plugin and also serves as the entry point for this plugin
100 characters long description:
Latest Tweets Obvs is a simple plugin that displays, well, latest tweets (obvs) via the Twitter API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected3,322 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
PHP364881,2541,690
PO File112863191,236
Sass94216165
CSS43987
JSON30076
Markdown27025
XML22123
JavaScript12220

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes24
▷ Abstract classes28.33%
▷ Concrete classes2291.67%
▷ Final classes00.00%
Methods143
▷ Static methods96.29%
▷ Public methods12184.62%
▷ Protected methods53.50%
▷ Private methods1711.89%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants13
▷ Global constants969.23%
▷ Class constants430.77%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin