74% titan-elements

Code Review | Titan Elements

WordPress plugin Titan Elements scored74%from 54 tests.

About plugin

  • Plugin page: titan-elements
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 29, 2016
  • Latest release: Jul 1, 2016
  • Number of updates: 14
  • Update frequency: every 0.3 days
  • Top authors: wpplugindepot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,031 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.89MB] [CPU: ▼34.60ms] Passed 4 tests

An overview of server-side resources used by Titan Elements
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.05 ▼6.43
Dashboard /wp-admin3.05 ▼0.2524.77 ▼26.95
Posts /wp-admin/edit.php3.06 ▼0.3024.51 ▼26.15
Add New Post /wp-admin/post-new.php3.05 ▼2.8325.69 ▼71.74
Media Library /wp-admin/upload.php3.06 ▼0.1724.65 ▼13.55

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

Input-output and database impact of this plugin
These are issues you should consider
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/titan-elements/" and "wp-content/uploads/"
    • (new file) wp-content/plugins/wp-titan-elements-DATA/.empty
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Titan Elements
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲2214.30 ▼0.051.79 ▼0.3143.28 ▲2.28
Dashboard /wp-admin2,197 ▲235.51 ▼0.0995.91 ▲1.9882.60 ▲39.95
Posts /wp-admin/edit.php2,120 ▲201.99 ▲0.0234.06 ▼7.1332.05 ▼5.65
Add New Post /wp-admin/post-new.php1,552 ▲2418.09 ▼5.29710.23 ▲77.5462.55 ▲10.58
Media Library /wp-admin/upload.php1,420 ▲234.22 ▲0.05102.07 ▲2.1983.51 ▲37.28

Uninstaller [IO: ▲0.00MB] [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
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/titan-elements/wp-titan-elements.php+30
    Undefined index: Author URI
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/titan-elements/elements/core-modules/singular/te-module-singular.php:30
    • > PHP Warning
      Use of undefined constant WP_TITAN_DIR - assumed 'WP_TITAN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/titan-elements/elements/element-hooks.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/titan-elements/elements/element-hooks.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/titan-elements/admin/editor.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/titan-elements/admin/extend-wp-editor.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/titan-elements/elements/functions/element-functions.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: code editor, titan elements, helper, designer, visual editor

titan-elements/wp-titan-elements.php 92% from 13 tests

The main PHP file in "Titan Elements" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("titan-elements.php" instead of "wp-titan-elements.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin3,447 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript102514061,827
PHP10531981,006
CSS44313614

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
4 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/js/mini-colors/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
resources/images/icon.png3.42KB0.83KB▼ 75.76%
resources/images/logo.png26.02KB10.80KB▼ 58.49%
resources/images/editor-bg.png6.76KB2.53KB▼ 62.54%