72% plot-my-tweets-and-posts

Code Review | Plot My Posts and Tweets

WordPress plugin Plot My Posts and Tweets scored72%from 54 tests.

About plugin

  • Plugin page: plot-my-tweets-an...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.3.1
  • WordPress version: 6.3.1
  • First release: Apr 2, 2012
  • Latest release: Apr 16, 2012
  • Number of updates: 14
  • Update frequency: every 1.0 days
  • Top authors: phy9pas (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,851 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼7.99ms] Passed 4 tests

Server-side resources used by Plot My Posts and Tweets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1345.12 ▼3.33
Dashboard /wp-admin3.49 ▲0.1049.81 ▼21.33
Posts /wp-admin/edit.php3.60 ▲0.2054.34 ▲4.02
Add New Post /wp-admin/post-new.php6.07 ▲0.1492.11 ▼11.31
Media Library /wp-admin/upload.php3.41 ▲0.1445.32 ▲5.75
Posts/Tweets Map /wp-admin/options-general.php?page=plotmypostsandtweets_settings3.3630.53
Posts/Tweets Map /wp-admin/edit.php?page=plotmypostsandtweets3.3937.71

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: 1 new table, 8 new options
New tables
wp_plotmypostsandtweets
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
pmpat_hash
db_upgraded
theysaidso_admin_options
pmpat_options

Browser metrics Passed 4 tests

An overview of browser requirements for Plot My Posts and Tweets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲2013.99 ▼0.531.51 ▼0.4641.51 ▼3.51
Dashboard /wp-admin2,206 ▲265.63 ▼0.21112.43 ▲13.4939.79 ▼5.61
Posts /wp-admin/edit.php2,128 ▲282.55 ▲0.5744.48 ▲3.1933.41 ▼3.25
Add New Post /wp-admin/post-new.php1,697 ▲16423.19 ▲0.12669.48 ▲32.4038.44 ▼19.43
Media Library /wp-admin/upload.php1,425 ▲225.10 ▲0.90108.36 ▲4.2048.34 ▲0.83
Posts/Tweets Map /wp-admin/options-general.php?page=plotmypostsandtweets_settings9312.5331.8734.31
Posts/Tweets Map /wp-admin/edit.php?page=plotmypostsandtweets7862.5131.6026.73

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
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • pmpat_hash
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=plotmypostsandtweets_settings
    • > Notice in wp-content/plugins/plot-my-tweets-and-posts/plotmypostsandtweets.php+154
    Undefined index: previous_key
    • > GET request to /wp-admin/options-general.php?page=plotmypostsandtweets_settings
    • > Notice in wp-content/plugins/plot-my-tweets-and-posts/plotmypostsandtweets.php+295
    Undefined variable: locked

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/plot-my-tweets-and-posts/plotmypostsandtweets.php:21

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?page=plotmypostsandtweets
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?v=3.5&sensor=false&ver=6.3.1 210:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 93% 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 need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Plot My Posts and Tweets Map), #2 (Plot My Posts and Tweets Admin Area)
You can look at the official readme.txt

plot-my-tweets-and-posts/plotmypostsandtweets.php 92% from 13 tests

"Plot My Posts and Tweets" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("plot-my-tweets-and-posts.php" instead of "plotmypostsandtweets.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected2,564 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP22461871,724
JavaScript3256500814
CSS22026

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity205.00
▷ Minimum class complexity205.00
▷ Maximum class complexity205.00
Average method complexity6.83
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods35
▷ Static methods38.57%
▷ Public methods514.29%
▷ Protected methods3085.71%
▷ Private methods00.00%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants48
▷ Global constants48100.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
11 compressed PNG files occupy 0.11MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pin_twitpic_small.png0.64KB0.61KB▼ 5.78%
images/icon_tweet.png0.57KB0.48KB▼ 16.27%
images/pin_post_small.png0.76KB0.81KB0.00%
images/pin_shadow.png0.53KB0.51KB▼ 2.04%
images/icon_post.png0.49KB0.49KB▼ 0.80%