10% futura

Code Review | FUTURA

WordPress plugin FUTURA scored 10% from 54 tests.

About plugin

  • Plugin page: futura
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.2-5.0.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2021
  • Latest release: Jun 18, 2021
  • Number of updates: 3
  • Update frequency: every 122.3 days
  • Top authors: miwa30 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 464 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/futura/lib/futura-activation.php+13
    Undefined variable: wp_error

Server metrics [RAM: ▲0.53MB] [CPU: ▲2.34ms] 75% from 4 tests

Server-side resources used by FUTURA
The following require your attention
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,185.59ms on /wp-admin/admin.php?page=futura-tag)
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5746.28 ▲8.10
Dashboard /wp-admin3.86 ▲0.5547.77 ▲1.52
Posts /wp-admin/edit.php3.91 ▲0.5549.24 ▲4.36
Add New Post /wp-admin/post-new.php6.40 ▲0.5194.28 ▲0.52
Media Library /wp-admin/upload.php3.72 ▲0.4937.88 ▲2.96
Detail Setting /wp-admin/admin.php?page=futura-setting3.7333.78
Tag Suggestions /wp-admin/admin.php?page=futura-tag3.751,185.59
Design Setting /wp-admin/admin.php?page=futura-design3.6932.13
Basic Setting /wp-admin/admin.php?page=futura3.7437.09

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 35 new files
Database: no new tables, 19 new options
New WordPress options
widget_futura_related
futura_html_border_color
futura_html_posts_wrap_bg_color
widget_recent-posts
futura_content_percentage
futura_summary_font_size
widget_futura_search
futura_html_h3_font_size
widget_recent-comments
futura_number_of_posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for FUTURA
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲18813.84 ▼0.515.60 ▲3.9638.70 ▼7.26
Dashboard /wp-admin2,245 ▲595.24 ▲0.32119.63 ▲11.9939.06 ▼5.73
Posts /wp-admin/edit.php2,128 ▲422.35 ▲0.3243.02 ▲7.0636.32 ▲1.83
Add New Post /wp-admin/post-new.php1,547 ▲2820.18 ▼2.87701.55 ▲31.0957.40 ▲6.12
Media Library /wp-admin/upload.php1,430 ▲424.59 ▲0.39103.04 ▼8.7142.17 ▼3.05
Detail Setting /wp-admin/admin.php?page=futura-setting1,2372.1534.2233.66
Tag Suggestions /wp-admin/admin.php?page=futura-tag9361.9325.6727.84
Design Setting /wp-admin/admin.php?page=futura-design9941.8726.1524.67
Basic Setting /wp-admin/admin.php?page=futura1,2071.9226.7128.58

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 did not uninstall successfully, leaving 19 options in the database
    • futura_post_title_font_size
    • widget_recent-comments
    • widget_recent-posts
    • futura_summary_font_size
    • futura_html_border_color
    • widget_futura_related
    • widget_theysaidso_widget
    • futura_display
    • can_compress_scripts
    • futura_number_of_posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=futura-tag
    • > Warning in wp-content/plugins/futura/lib/futura-class.php+959
    Illegal string offset 'list'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=futura-tag
    • > Notice in wp-content/plugins/futura/lib/futura-class.php+960
    Uninitialized string offset: 0
    • > GET request to /wp-admin/admin.php?page=futura-tag
    • > Warning in wp-content/plugins/futura/lib/futura-class.php+960
    Illegal string offset 'total'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=futura-tag
    • > Warning in wp-content/plugins/futura/lib/futura-class.php+975
    Invalid argument supplied for foreach()

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
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_single() in wp-content/plugins/futura/assets/template/percentage.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/futura/assets/template/design_setting.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/futura/assets/template/search_setting.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/futura/assets/template/index.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/futura/lib/futura-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/futura/assets/template/detail_setting.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/futura/assets/template/tag_setting.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/futura/lib/futura-widget.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=futura-design
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=futura-design 169 The specified value "#333" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: machine learning, related post

futura/futura.php Passed 13 tests

The main PHP script in "FUTURA" version 1.3.5 is automatically included on every request by WordPress
52 characters long description:
Show related post and keyword search by AI algorithm

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin4,311 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP145641293,084
CSS33311663
PO File116116322
SVG700125
JavaScript312878
Markdown114039

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity50.20
▷ Minimum class complexity3.00
▷ Maximum class complexity136.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods109
▷ Static methods43.67%
▷ Public methods109100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.54MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png99.60KB23.56KB▼ 76.34%
screenshot-2.png165.75KB46.54KB▼ 71.92%
assets/images/logo-color.png2.70KB1.37KB▼ 49.15%
screenshot-3.png147.64KB41.03KB▼ 72.21%
screenshot-1.png138.45KB34.30KB▼ 75.23%