10% wp-jtweets

Code Review | WP-jTweets

WordPress plugin WP-jTweets scored10%from 54 tests.

About plugin

  • Plugin page: wp-jtweets
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.7.0
  • WordPress version: 6.3.1
  • First release: Oct 23, 2011
  • Latest release: Feb 26, 2021
  • Number of updates: 32
  • Update frequency: every 106.7 days
  • Top authors: areimann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /4,217 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-jtweets/class_widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; jTweetsWidget has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼54.13ms] Passed 4 tests

Analyzing server-side resources used by WP-jTweets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.294.42 ▼33.50
Dashboard /wp-admin2.20 ▼1.157.47 ▼49.42
Posts /wp-admin/edit.php2.20 ▼1.166.93 ▼44.49
Add New Post /wp-admin/post-new.php2.20 ▼3.696.03 ▼89.09
Media Library /wp-admin/upload.php2.20 ▼1.046.50 ▼26.53

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_jtweetswidget
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

WP-jTweets: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲14813.54 ▼1.208.20 ▲6.5041.41 ▼6.88
Dashboard /wp-admin2,206 ▲184.81 ▼1.09102.46 ▲1.4840.55 ▼4.83
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0142.75 ▲1.0937.16 ▼2.50
Add New Post /wp-admin/post-new.php1,514 ▼1917.39 ▼5.60688.35 ▲74.4051.57 ▼0.89
Media Library /wp-admin/upload.php1,391 ▲64.24 ▲0.0498.01 ▼3.9942.76 ▼1.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-jtweets/class_widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; jTweetsWidget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_jtweetswidget
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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
Even though no errors were found, this is by no means an exhaustive test

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-jtweets/index.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-jtweets/class_widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: twitter, json, status, cycle, tweets...

wp-jtweets/index.php 92% from 13 tests

Analyzing the main PHP file in "WP-jTweets" version 1.1.5
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-jtweets.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,028 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4211333986
JavaScript15030
CSS13212

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.92
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods79
▷ Static methods1012.66%
▷ Public methods6886.08%
▷ Protected methods22.53%
▷ Private methods911.39%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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