84% complexity

Code Review | Complexity

WordPress plugin Complexity scored84%from 54 tests.

About plugin

  • Plugin page: complexity
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: Oct 13, 2013
  • Latest release: Oct 13, 2013
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: Bjoern Kjos-Hanssen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /766 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.80ms] Passed 4 tests

An overview of server-side resources used by Complexity
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.13 ▼4.39
Dashboard /wp-admin3.31 ▲0.0148.12 ▼4.32
Posts /wp-admin/edit.php3.36 ▲0.0150.48 ▼6.56
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.43 ▼7.93
Media Library /wp-admin/upload.php3.24 ▲0.0136.85 ▼0.51

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Complexity
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.24 ▼1.061.82 ▼0.2641.73 ▼1.97
Dashboard /wp-admin2,206 ▲184.87 ▼0.02108.82 ▼10.2241.61 ▼4.45
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0040.71 ▲2.4837.57 ▲3.64
Add New Post /wp-admin/post-new.php1,533 ▲1423.38 ▲0.21670.98 ▼32.0960.11 ▼1.43
Media Library /wp-admin/upload.php1,388 ▼04.15 ▼0.0396.18 ▼6.2740.94 ▼6.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/complexity/complexity.php:63

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: math, complexity

complexity/complexity.php Passed 13 tests

Analyzing the main PHP file in "Complexity" version 0.1
128 characters long description:
Provides a shortcode for nondeterministic automatic complexity. Example: [complexity string="0110"] is replaced by the string 3.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected40 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181740

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin