84% ez-simple-tweet

Code Review | ez_simple_tweet

WordPress plugin ez_simple_tweet scored84%from 54 tests.

About plugin

  • Plugin page: ez-simple-tweet
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.0
  • WordPress version: 6.3.1
  • First release: Dec 10, 2015
  • Latest release: Dec 10, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: k2klettern (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /582 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.05MB] [CPU: ▼0.76ms] Passed 4 tests

Analyzing server-side resources used by ez_simple_tweet
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.43 ▲0.30
Dashboard /wp-admin3.36 ▲0.0647.38 ▼2.57
Posts /wp-admin/edit.php3.48 ▲0.1244.72 ▼2.78
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.03 ▲4.06
Media Library /wp-admin/upload.php3.29 ▲0.0535.50 ▲2.02
EZ Tweet Options /wp-admin/options-general.php?page=ez-simple-tweet/class_eztweet.php3.2631.08

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_eztweet_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by ez_simple_tweet
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.57 ▼0.855.07 ▲3.3744.54 ▼4.16
Dashboard /wp-admin2,210 ▲255.91 ▲0.05101.07 ▼20.6639.05 ▼8.24
Posts /wp-admin/edit.php2,096 ▲72.04 ▼0.0135.96 ▼6.2331.17 ▼3.91
Add New Post /wp-admin/post-new.php1,532 ▲1323.37 ▲0.13590.67 ▼75.8057.97 ▲7.24
Media Library /wp-admin/upload.php1,395 ▲134.20 ▼0.0695.36 ▼4.7342.90 ▲1.01
EZ Tweet Options /wp-admin/options-general.php?page=ez-simple-tweet/class_eztweet.php8562.0222.7528.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_eztweet_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ez-simple-tweet/inc/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/ez-simple-tweet/inc/admin_page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ez-simple-tweet/ez_simple_tweet.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Enter in Twitter app and create an application.), #2 (Once you create your app, you will get the Keys.), #3 (Generate an access token and copy the token keys.), #4 (Enter your keys inside the admin page.), #5 (This is how you will see your last tweet using the shortcode inside a post.), #6 (This is the last tweet showing it in the widget.)
The official readme.txt is a good inspiration

ez-simple-tweet/ez_simple_tweet.php 92% from 13 tests

The primary PHP file in "ez_simple_tweet" version 0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("ez-simple-tweet.php" instead of "ez_simple_tweet.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected344 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP54837265
PO File1191960
CSS12019

PHP code Passed 2 tests

An short overview of 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.17
Average class complexity7.50
▷ Minimum class complexity6.00
▷ Maximum class complexity9.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
Functions2
▷ Named functions2100.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 were not PNG files found in your plugin