10% demomentsomtres-portfolio

Code Review | DeMomentSomTres Portfolio

WordPress plugin DeMomentSomTres Portfolio scored10%from 54 tests.

About plugin

  • Plugin page: demomentsomtres-p...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Nov 17, 2013
  • Latest release: May 16, 2014
  • Number of updates: 14
  • Update frequency: every 13.8 days
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,364 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/demomentsomtres-portfolio/widgets.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; DeMomentSomTresPortfolioWorksWidget has a deprecated constructor

Server metrics [RAM: ▼1.72MB] [CPU: ▼54.15ms] Passed 4 tests

An overview of server-side resources used by DeMomentSomTres Portfolio
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.206.05 ▼35.53
Dashboard /wp-admin2.28 ▼1.028.48 ▼44.90
Posts /wp-admin/edit.php2.28 ▼1.077.53 ▼38.12
Add New Post /wp-admin/post-new.php2.28 ▼3.607.28 ▼98.06
Media Library /wp-admin/upload.php2.28 ▼0.956.62 ▼26.59
Service Groups /wp-admin/edit-tags.php?taxonomy=portfolio-group&post_type=portfolio-service2.287.43
Works /wp-admin/edit.php?post_type=portfolio-work2.287.67
DeMomentSomTres Portfolio /wp-admin/options-general.php?page=dmst_portfolio2.287.09
Add Work /wp-admin/post-new.php?post_type=portfolio-work2.288.53
Add Service /wp-admin/post-new.php?post_type=portfolio-service2.287.19
Services /wp-admin/edit.php?post_type=portfolio-service2.288.19

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_demomentsomtresportfolioworkswidget
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

DeMomentSomTres Portfolio: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲13313.68 ▼0.691.72 ▲0.0943.83 ▲0.08
Dashboard /wp-admin2,271 ▲804.85 ▼1.0398.84 ▼9.7241.49 ▼2.06
Posts /wp-admin/edit.php2,154 ▲621.99 ▼0.0136.73 ▼3.6434.23 ▲0.51
Add New Post /wp-admin/post-new.php1,565 ▲3217.44 ▼5.75653.33 ▲34.4351.97 ▼2.57
Media Library /wp-admin/upload.php1,450 ▲684.26 ▲0.0594.31 ▼3.0244.03 ▼0.58
Service Groups /wp-admin/edit-tags.php?taxonomy=portfolio-group&post_type=portfolio-service1,2932.2626.9528.50
Works /wp-admin/edit.php?post_type=portfolio-work1,1661.9630.4329.10
DeMomentSomTres Portfolio /wp-admin/options-general.php?page=dmst_portfolio1,1151.6923.8730.60
Add Work /wp-admin/post-new.php?post_type=portfolio-work2,7767.73179.7778.63
Add Service /wp-admin/post-new.php?post_type=portfolio-service2,8667.84180.7064.62
Services /wp-admin/edit.php?post_type=portfolio-service1,1741.9331.6534.00

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
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/demomentsomtres-portfolio/widgets.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; DeMomentSomTresPortfolioWorksWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_demomentsomtresportfolioworkswidget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=portfolio-service
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/demomentsomtres-portfolio/widgets.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; DeMomentSomTresPortfolioWorksWidget has a deprecated constructor
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=portfolio-service
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/demomentsomtres-portfolio/demomentsomtres-portfolio.php+62
    Function create_function() is deprecated
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=portfolio-service
    • > POST request to /wp-admin/admin-ajax.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in DeMomentSomTresPortfolioWorksWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=dmst_portfolio
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=dmst_portfolio
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=portfolio-service
    • > Notice in wp-content/plugins/demomentsomtres-portfolio/functions.php+431
    Undefined index: post_type

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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/demomentsomtres-portfolio/widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/demomentsomtres-portfolio/admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/demomentsomtres-portfolio/demomentsomtres-portfolio.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were 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
1 plugin tags: service portfolio

demomentsomtres-portfolio/demomentsomtres-portfolio.php Passed 13 tests

The principal PHP file in "DeMomentSomTres Portfolio" v. 1.0.5 is loaded by WordPress automatically on each request
73 characters long description:
DeMomentSomTres Portfolio lets you show your portfolio linked to services

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 plugin1,046 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP491359801
PO File1820187
JavaScript411658

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions65
▷ Named functions65100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
mce_plugins/icon-services.png2.16KB0.72KB▼ 66.49%
mce_plugins/icon-works.png2.35KB1.16KB▼ 50.71%