10% threepress

Code Review | Threepress

WordPress plugin Threepress scored10%from 54 tests.

About plugin

  • Plugin page: threepress
  • Plugin version: 1.6.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: May 20, 2021
  • Latest release: Sep 23, 2023
  • Number of updates: 34
  • Update frequency: every 25.2 days
  • Top authors: kerryoco (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /4,088 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.82ms] Passed 4 tests

This is a short check of server-side resources used by Threepress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.09 ▲0.23
Dashboard /wp-admin3.34 ▲0.0450.87 ▲0.99
Posts /wp-admin/edit.php3.46 ▲0.1050.64 ▲6.37
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.33 ▼10.98
Media Library /wp-admin/upload.php3.24 ▲0.0237.13 ▲2.49

Server storage [IO: ▲33.00MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • Total filesystem usage should be limited to 25MB (currently using 33.00MB)
Filesystem: 223 new files
Database: 1 new table, 6 new options
New tables
threepress_shortcodes
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Threepress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,083 ▲31217.95 ▲3.6011.93 ▲9.8842.98 ▼0.74
Dashboard /wp-admin2,372 ▲1847.86 ▲3.02127.05 ▲14.3138.52 ▼2.02
Posts /wp-admin/edit.php2,287 ▲1954.50 ▲2.4860.79 ▲22.3632.65 ▼3.45
Add New Post /wp-admin/post-new.php6,467 ▲4,94824.57 ▲1.39871.42 ▲210.0039.00 ▼20.53
Media Library /wp-admin/upload.php1,463 ▲725.76 ▲1.55100.78 ▼3.8145.99 ▲1.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • threepress_shortcodes
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/threepress/inc/admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: multiplayer, gltf, threejs, chat, 3d model

threepress/threepress.php Passed 13 tests

Analyzing the main PHP file in "Threepress" version 1.6.2
50 characters long description:
Generate 3D gallery shortcodes powered by three.js

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin44,111 lines of code in 89 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript8128,7594,93342,513
CSS4161311,096
PHP322669484
Markdown113018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes1100.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods22
▷ Static methods22100.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
19 PNG files occupy 1.55MB with 1.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-menu.png28.54KB10.57KB▼ 62.97%
assets/env-maps/pisaRGBM16/ny.png156.51KB13.97KB▼ 91.07%
assets/env-maps/pisa/nz.png83.03KB37.59KB▼ 54.73%
assets/sun.png42.27KB13.32KB▼ 68.50%
assets/env-maps/pisaRGBM16/px.png145.81KB23.31KB▼ 84.01%