82% wp-tripolis

Code Review | WP-Tripolis

WordPress plugin WP-Tripolis scored 82% from 54 tests.

About plugin

  • Plugin page: wp-tripolis
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.4.1
  • WordPress version: 5.8.1
  • First release: Sep 3, 2014
  • Latest release: Jun 17, 2016
  • Number of updates: 10
  • Update frequency: every 65.4 days
  • Top authors: peter.eussen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 697 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼145.99ms] Passed 4 tests

A check of server-side resources used by WP-Tripolis
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.87 ▲12.15
Dashboard /wp-admin3.10 ▲0.0541.53 ▼3.56
Posts /wp-admin/edit.php3.22 ▲0.1146.85 ▲6.59
Add New Post /wp-admin/post-new.php5.46 ▲0.0390.17 ▼583.25
Media Library /wp-admin/upload.php3.05 ▲0.0536.17 ▼3.72
WP-Tripolis Generator /wp-admin/tools.php?page=wptripoliswptripolisshortcodegenerator3.0531.17
WP-Tripolis /wp-admin/options-general.php?page=wptripolis_optionsscreen2.9931.47

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 62 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WP-Tripolis: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,719 ▲12315.95 ▲0.439.48 ▲2.5946.89 ▼3.00
Dashboard /wp-admin3,004 ▲706.06 ▲0.07147.86 ▲4.97113.26 ▼4.14
Posts /wp-admin/edit.php2,754 ▲152.82 ▼0.0065.54 ▼4.6190.31 ▲0.21
Add New Post /wp-admin/post-new.php1,686 ▲10519.18 ▲1.51378.12 ▼69.72112.34 ▼23.04
Media Library /wp-admin/upload.php1,822 ▲155.01 ▼0.02154.00 ▼40.10131.50 ▼7.43
WP-Tripolis Generator /wp-admin/tools.php?page=wptripoliswptripolisshortcodegenerator1,0182.2258.9672.53
WP-Tripolis /wp-admin/options-general.php?page=wptripolis_optionsscreen1,1582.1862.5793.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

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
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wptripolis_optionsscreen
    • > Notice in wp-content/plugins/wp-tripolis/lib/src/OptionsScreen.php+122
    Trying to access array offset on value of type bool

SRP 0% 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 output text when accessed directly:
    • > /wp-content/plugins/wp-tripolis/plugin.php
  • 39× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPTripolis\\Tripolis\\Service\\AbstractService' not found in wp-content/plugins/wp-tripolis/lib/src/Tripolis/Service/DirectEmailTypeService.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WPTripolis\\Tripolis\\Response\\AbstractIteratorResponse' not found in wp-content/plugins/wp-tripolis/lib/src/Tripolis/Response/ContactDatabaseFieldService/GetByContactDatabaseIdResponse.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WPTripolis\\Tripolis\\Response\\AbstractIteratorResponse' not found in wp-content/plugins/wp-tripolis/lib/src/Tripolis/Response/UserService/GetUsersInClientDomainByAuthInfoResponse.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WPTripolis\\Tripolis\\Service\\AbstractService' not found in wp-content/plugins/wp-tripolis/lib/src/Tripolis/Service/GenericService.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPTripolis\\Tripolis\\Service\\AbstractService' not found in wp-content/plugins/wp-tripolis/lib/src/Tripolis/Service/ContactDatabaseFieldService.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WPTripolis\\Tripolis\\Service\\AbstractService' not found in wp-content/plugins/wp-tripolis/lib/src/Tripolis/Service/WorkspaceService.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WPTripolis\\Wordpress\\Utility' not found in wp-content/plugins/wp-tripolis/lib/src/WPTripolisShortcodeGenerator.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WPTripolis\\Tripolis\\Service\\AbstractService' not found in wp-content/plugins/wp-tripolis/lib/src/Tripolis/Service/ContactService.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WPTripolis\\Tripolis\\Response\\AbstractIteratorResponse' not found in wp-content/plugins/wp-tripolis/lib/src/Tripolis/Response/ContactDatabaseFieldService/GetByContactDatabaseFieldGroupIdResponse.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wptripolis_show_form_status() in wp-content/plugins/wp-tripolis/templates/subscribe.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: tripolis, forms, shortcode

wp-tripolis/plugin.php 85% from 13 tests

The main file in "WP-Tripolis" v. 0.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-tripolis.php" instead of "plugin.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 265 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin2,531 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP556301,2762,348
JavaScript1265116
CSS210067

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.92
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces15
Interfaces0
Traits1
Classes47
▷ Abstract classes612.77%
▷ Concrete classes4187.23%
▷ Final classes00.00%
Methods172
▷ Static methods169.30%
▷ Public methods14684.88%
▷ Protected methods2615.12%
▷ Private methods00.00%
Functions27
▷ Named functions2488.89%
▷ Anonymous functions311.11%
Constants17
▷ Global constants15.88%
▷ Class constants1694.12%
▷ Public constants16100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin