68% latest-twitter-updates-with-date-and-time

Code Review | Latest twitter updates with date and time

WordPress plugin Latest twitter updates with date and time scored68%from 54 tests.

About plugin

  • Plugin page: latest-twitter-up...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jan 15, 2013
  • Latest release: Sep 9, 2015
  • Number of updates: 14
  • Update frequency: every 69.1 days
  • Top authors: opensourcetech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,728 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.64MB] [CPU: ▼51.67ms] Passed 4 tests

This is a short check of server-side resources used by Latest twitter updates with date and time
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.40 ▼1.1010.57 ▼28.70
Dashboard /wp-admin2.41 ▼0.9711.58 ▼51.77
Posts /wp-admin/edit.php2.41 ▼0.9812.91 ▼37.19
Add New Post /wp-admin/post-new.php2.41 ▼3.5111.51 ▼86.64
Media Library /wp-admin/upload.php2.41 ▼0.8610.10 ▼31.09

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_latest_twitter_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Latest twitter updates with date and time
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.25 ▼0.102.04 ▲0.4146.42 ▲2.10
Dashboard /wp-admin2,199 ▲195.62 ▼0.0583.26 ▼6.0140.52 ▼1.67
Posts /wp-admin/edit.php2,107 ▲71.96 ▼0.0539.13 ▲0.2734.99 ▼2.94
Add New Post /wp-admin/post-new.php1,529 ▲323.58 ▲0.31697.54 ▼32.8552.27 ▼8.80
Media Library /wp-admin/upload.php1,404 ▲74.16 ▼0.0897.38 ▼21.3845.06 ▼5.13
Latest tweet settings /wp-admin/latest_twitter_updates.php260.420.1714.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in latest_twitter_widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • widget_latest_twitter_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/latest-twitter-updates-with-date-and-time/latest_twitter_updates.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/latest_twitter_updates.php
    • > Network (severe)
    wp-admin/latest_twitter_updates.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: twitter, date, twitter updates, time, twitter plugin

latest-twitter-updates-with-date-and-time/latest_twitter_updates.php 92% from 13 tests

The main file in "Latest twitter updates with date and time" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("latest-twitter-updates-with-date-and-time.php" instead of "latest_twitter_updates.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
Good job! No executable or dangerous file extensions detected463 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2104117438
CSS11025

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity23.50
▷ Minimum class complexity19.00
▷ Maximum class complexity28.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
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
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screen2.png25.67KB8.57KB▼ 66.62%
screen1.png19.40KB7.61KB▼ 60.79%
twitter_logo.png8.99KB3.27KB▼ 63.69%