72% simple-project-managment

Code Review | Simple Project Manager

WordPress plugin Simple Project Manager scored72%from 54 tests.

About plugin

  • Plugin page: simple-project-ma...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-5.1.1
  • WordPress version: 6.3.1
  • First release: May 14, 2015
  • Latest release: Mar 17, 2019
  • Number of updates: 17
  • Update frequency: every 82.5 days
  • Top authors: albdesign (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

50+ active /7,879 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Simple Project Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1339.19 ▼1.96
Dashboard /wp-admin3.49 ▲0.1948.27 ▼3.05
Posts /wp-admin/edit.php3.60 ▲0.2544.83 ▼3.81
Add New Post /wp-admin/post-new.php6.10 ▲0.2180.73 ▼13.42
Media Library /wp-admin/upload.php3.41 ▲0.1939.41 ▲0.83
Clients /wp-admin/edit.php?post_type=albdesign_client3.4835.46
Settings /wp-admin/edit.php?post_type=albdesign_project&page=albdesign-project-settings3.4632.94
Reports /wp-admin/edit.php?post_type=albdesign_project&page=albdesign-project-Reports3.5548.30
Projects /wp-admin/edit.php?post_type=albdesign_project3.4837.22
Invoices /wp-admin/edit.php?post_type=albdesign_invoice3.4832.15
Tasks /wp-admin/edit.php?post_type=albdesign_task3.4839.58

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 735 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Project Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲12913.32 ▼1.042.00 ▲0.3546.79 ▲6.96
Dashboard /wp-admin2,256 ▲765.87 ▲0.24112.98 ▲21.2344.13 ▲3.60
Posts /wp-admin/edit.php2,165 ▲622.31 ▲0.3634.95 ▼0.6033.76 ▼2.87
Add New Post /wp-admin/post-new.php1,582 ▲5423.23 ▲0.02688.97 ▲11.8638.70 ▼15.28
Media Library /wp-admin/upload.php1,464 ▲644.55 ▲0.32110.01 ▲14.6447.65 ▲3.98
Clients /wp-admin/edit.php?post_type=albdesign_client1,1232.2938.2128.47
Settings /wp-admin/edit.php?post_type=albdesign_project&page=albdesign-project-settings1,0782.3432.5326.32
Reports /wp-admin/edit.php?post_type=albdesign_project&page=albdesign-project-Reports2,0962.9391.3560.00
Projects /wp-admin/edit.php?post_type=albdesign_project1,1392.3239.9626.22
Invoices /wp-admin/edit.php?post_type=albdesign_invoice1,1642.9043.4925.67
Tasks /wp-admin/edit.php?post_type=albdesign_task1,1232.3238.1227.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-project-managment/assets/admin/dompdf/load_font.php
    • > /wp-content/plugins/simple-project-managment/assets/admin/dompdf/lib/php-font-lib/www/font_list.php
    • > /wp-content/plugins/simple-project-managment/include/helpers/reports_pages/incomes_tab_content.php
    • > /wp-content/plugins/simple-project-managment/assets/admin/dompdf/lib/php-css-parser/tests/quickdump.php
    • > /wp-content/plugins/simple-project-managment/assets/admin/dompdf/lib/php-font-lib/index.php
    • > /wp-content/plugins/simple-project-managment/assets/admin/dompdf/lib/php-font-lib/www/index.php
  • 307× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\Block' not found in wp-content/plugins/simple-project-managment/assets/admin/dompdf/src/FrameReflower/TableCell.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\TrueType\\File' not found in wp-content/plugins/simple-project-managment/assets/admin/dompdf/lib/php-font-lib/src/FontLib/WOFF/File.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/simple-project-managment/assets/admin/dompdf/lib/php-svg-lib/src/Svg/Tag/Text.php:11
    • > PHP Notice
      Undefined variable: fontDir in wp-content/plugins/simple-project-managment/assets/admin/dompdf/lib/fonts/dompdf_font_family_cache.php on line 39
    • > PHP Notice
      Undefined variable: fontDir in wp-content/plugins/simple-project-managment/assets/admin/dompdf/lib/fonts/dompdf_font_family_cache.php on line 22
    • > PHP Notice
      Undefined variable: fontDir in wp-content/plugins/simple-project-managment/assets/admin/dompdf/lib/fonts/dompdf_font_family_cache.php on line 46
    • > PHP Warning
      Use of undefined constant DB_HOST - assumed 'DB_HOST' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-project-managment/assets/admin/dompdf/include/page_cache.cls.php on line 28
    • > PHP Notice
      Undefined variable: fontDir in wp-content/plugins/simple-project-managment/assets/admin/dompdf/lib/fonts/dompdf_font_family_cache.php on line 5
    • > PHP Fatal error
      Uncaught Error: Interface 'Svg\\Surface\\SurfaceInterface' not found in wp-content/plugins/simple-project-managment/assets/admin/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfacePDFLib.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/simple-project-managment/assets/admin/dompdf/lib/php-svg-lib/src/Svg/Tag/Line.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=albdesign_task
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at Object.hooks (/wp-content/plugins/simple-project-managment/include/meta-box-class/js/meta-box.js:193:73)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/simple-project-managment/include/meta-box-class/js/meta-box.js:338:20)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=albdesign_task
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === simple-project-managment === )
The official readme.txt is a good inspiration

simple-project-managment/projects.php 92% from 13 tests

The main file in "Simple Project Manager" v. 1.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-project-managment.php" instead of "projects.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected88,646 lines of code in 517 files:
LanguageFilesBlank linesComment linesLines of code
PHP33815,81125,69261,153
JavaScript451,9362,54811,991
CSS8162775111,676
LESS20374971,760
Markdown62550909
PO File6277414676
XML632201
JSON500139
HTML52068
YAML416365
SVG1008

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 652)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity34.72
▷ Minimum class complexity1.00
▷ Maximum class complexity765.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity652.00
Code structure
Namespaces33
Interfaces6
Traits0
Classes291
▷ Abstract classes175.84%
▷ Concrete classes27494.16%
▷ Final classes00.00%
Methods3,247
▷ Static methods1935.94%
▷ Public methods2,80186.26%
▷ Protected methods32810.10%
▷ Private methods1183.63%
Functions69
▷ Named functions5478.26%
▷ Anonymous functions1521.74%
Constants246
▷ Global constants104.07%
▷ Class constants23695.93%
▷ Public constants236100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
79 compressed PNG files occupy 0.12MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/meta-box-class/js/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
assets/admin/jtable/themes/jqueryui/close.png1.19KB1.22KB0.00%
assets/admin/dompdf/lib/php-font-lib/www/css/blitzer/images/ui-bg_glass_55_fbf8ee_1x400.png0.14KB0.14KB▼ 2.10%
include/meta-box-class/images/move.png0.26KB0.26KB0.00%
assets/admin/dompdf/lib/php-font-lib/www/css/blitzer/images/ui-bg_highlight-hard_100_f6f6f6_1x100.png0.09KB0.11KB0.00%