78% psygraph

Code Review | Psygraph

WordPress plugin Psygraph scored 78% from 54 tests.

About plugin

  • Plugin page: psygraph
  • Plugin version: 0.8.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 5.8.1
  • First release: Mar 3, 2018
  • Latest release: Mar 3, 2018
  • Number of updates: 3
  • Update frequency: every 321.4 days
  • Top authors: arborrhythms (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 370 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼136.54ms] Passed 4 tests

This is a short check of server-side resources used by Psygraph
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.01 ▲0.1741.76 ▲0.80
Dashboard /wp-admin3.29 ▲0.2458.38 ▲7.21
Posts /wp-admin/edit.php3.34 ▲0.2455.88 ▲3.74
Add New Post /wp-admin/post-new.php5.59 ▲0.16104.37 ▼550.09
Media Library /wp-admin/upload.php3.17 ▲0.1735.83 ▼0.60
Psygraph /wp-admin/options-general.php?page=Psygraph3.1433.92

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 51 new files
Database: 1 new table, no new options
New tables
wp_psygraph

Browser metrics Passed 4 tests

This is an overview of browser requirements for Psygraph
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,817 ▲24516.22 ▲0.8919.18 ▲5.5447.44 ▼6.74
Dashboard /wp-admin2,975 ▲415.85 ▼0.27146.90 ▼28.81121.90 ▼4.96
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0086.49 ▲10.43103.05 ▲5.06
Add New Post /wp-admin/post-new.php1,686 ▲318.74 ▲0.37449.50 ▲12.54116.34 ▼3.35
Media Library /wp-admin/upload.php1,738 ▼695.02 ▼0.02172.98 ▼3.34127.23 ▲1.05
Psygraph /wp-admin/options-general.php?page=Psygraph1,1552.0965.0187.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • pages
    • events
    • users
    • categories

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 10× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/psygraph/pg/util/test.php
    • > /wp-content/plugins/psygraph/pg/input.php
    • > /wp-content/plugins/psygraph/pg/server.php
    • > /wp-content/plugins/psygraph/pg/page.php
    • > /wp-content/plugins/psygraph/pg/mediaServer.php
    • > /wp-content/plugins/psygraph/pg/util/dumpFile.php
    • > /wp-content/plugins/psygraph/pg/generateLink.php
    • > /wp-content/plugins/psygraph/pg/command.php
    • > /wp-content/plugins/psygraph/pg/output.php
    • > /wp-content/plugins/psygraph/pg/admin.php
  • 50× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required './util.php' (include_path='.:/usr/share/php') in wp-content/plugins/psygraph/pg/pg.php on line 6
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/psygraph/pg/out.php on line 624
    • > PHP Notice
      Undefined index: username in wp-content/plugins/psygraph/pg/output.php on line 8
    • > PHP Notice
      Undefined index: username in wp-content/plugins/psygraph/pg/page.php on line 11
    • > PHP Warning
      include_once(): Failed opening 'pg.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/psygraph/pg/old/page_map.php on line 4
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/psygraph/pg/out.php on line 663
    • > PHP Warning
      include_once(in.php): failed to open stream: No such file or directory in wp-content/plugins/psygraph/pg/old/page_map.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/psygraph/pg/util/testParams.php on line 9
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/psygraph/pg/util/testParams.php on line 18
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/psygraph/pg/out.php on line 663

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (See "https://psygraph.com/app/help" for iOS screenshots.), #2 (See "https://psygraph.com/app/wordpress" for WordPress screenshots.)
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

psygraph/psygraph.php 92% from 13 tests

Analyzing the main PHP file in "Psygraph" version 0.8.6
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 308 characters long)

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
Everything looks great! No dangerous files found in this plugin5,609 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP275165514,497
XML200667
JavaScript31440286
HTML3109145
CSS22012
JSON2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions234
▷ Named functions234100.00%
▷ Anonymous functions00.00%
Constants31
▷ Global constants00.00%
▷ Class constants31100.00%
▷ Public constants31100.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