84% f2-tumblr-widget

Code Review | F2 Tumblr Widget

WordPress plugin F2 Tumblr Widget scored 84% from 54 tests.

About plugin

  • Plugin page: f2-tumblr-widget
  • Plugin version: 0.2.16
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.8.2
  • WordPress version: 6.3.1
  • First release: May 20, 2014
  • Latest release: Jan 5, 2022
  • Number of updates: 25
  • Update frequency: every 111.5 days
  • Top authors: fsquared (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active / 13,928 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.35ms] Passed 4 tests

A check of server-side resources used by F2 Tumblr Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1134.35 ▼11.10
Dashboard /wp-admin3.40 ▲0.0946.16 ▼3.28
Posts /wp-admin/edit.php3.51 ▲0.1551.60 ▲0.01
Add New Post /wp-admin/post-new.php6.00 ▲0.1184.80 ▼11.02
Media Library /wp-admin/upload.php3.32 ▲0.0936.87 ▲1.98

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_f2-tumblr-widget
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for F2 Tumblr Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲15413.76 ▼0.794.80 ▲3.0336.39 ▼15.36
Dashboard /wp-admin2,210 ▲224.81 ▼1.07109.85 ▼7.4141.36 ▼4.77
Posts /wp-admin/edit.php2,090 ▲12.01 ▼0.0140.17 ▲4.6833.72 ▼0.22
Add New Post /wp-admin/post-new.php1,519 ▲523.15 ▲5.44647.18 ▼32.8453.01 ▼19.19
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.0594.89 ▼16.2541.63 ▼5.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_f2-tumblr-widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 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/f2-tumblr-widget/f2-tumblr.php:25
    • > PHP Notice
      Undefined variable: tumblr_data in wp-content/plugins/f2-tumblr-widget/views/widget.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/f2-tumblr-widget/views/admin.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: tumblr, widget, feed

f2-tumblr-widget/f2-tumblr.php 92% from 13 tests

The main PHP file in "F2 Tumblr Widget" ver. 0.2.16 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("f2-tumblr-widget.php" instead of "f2-tumblr.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
No dangerous file extensions were detected1,000 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3110186939
CSS18334
JavaScript27427

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 files were detected