66% gravitation-portfolios

Code Review | Gravitation Portfolios

WordPress plugin Gravitation Portfolios scored66%from 54 tests.

About plugin

  • Plugin page: gravitation-portf...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.5.2
  • WordPress version: 6.3.1
  • First release: May 16, 2016
  • Latest release: May 17, 2016
  • Number of updates: 5
  • Update frequency: every 41.0 days
  • Top authors: UlisesFreitas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /845 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▼9.26ms] Passed 4 tests

This is a short check of server-side resources used by Gravitation Portfolios
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4543.72 ▲2.10
Dashboard /wp-admin3.75 ▲0.4046.64 ▼30.48
Posts /wp-admin/edit.php3.80 ▲0.4549.30 ▲5.18
Add New Post /wp-admin/post-new.php6.27 ▲0.3886.21 ▼11.32
Media Library /wp-admin/upload.php3.61 ▲0.3839.15 ▲2.65
Add New /wp-admin/post-new.php?post_type=gv_portfolios3.7747.01
Portfolios Category /wp-admin/edit-tags.php?taxonomy=gravitation_portfolios_cat&post_type=gv_portfolios3.6035.06
All portfolios /wp-admin/edit.php?post_type=gv_portfolios3.6536.49

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 87 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Gravitation Portfolios
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲20413.59 ▼1.156.10 ▲4.3239.77 ▼3.27
Dashboard /wp-admin2,241 ▲534.93 ▲0.06103.07 ▼8.2138.72 ▼4.10
Posts /wp-admin/edit.php2,124 ▲352.12 ▲0.1137.30 ▲1.7232.69 ▼2.12
Add New Post /wp-admin/post-new.php1,543 ▲2917.40 ▼0.16696.07 ▲87.7950.83 ▲4.32
Media Library /wp-admin/upload.php1,423 ▲324.26 ▲0.0599.00 ▼0.2444.28 ▲1.87
Help /wp-admin/gravitation-portfolios.php260.440.0913.56
Add New /wp-admin/post-new.php?post_type=gv_portfolios2,4207.70174.64137.71
Portfolios Category /wp-admin/edit-tags.php?taxonomy=gravitation_portfolios_cat&post_type=gv_portfolios1,2942.1326.3129.69
All portfolios /wp-admin/edit.php?post_type=gv_portfolios1,1212.0030.0230.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=gv_portfolios
    • > Warning in wp-content/plugins/gravitation-portfolios/meta-box-class/my-meta-box-class.php+383
    count(): Parameter must be an array or an object that implements Countable

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/gravitation-portfolios/meta-box-class/inc/sample.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/gravitation-portfolios/gravitation-portfolios.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/gravitation-portfolios/single-gravitation-portfolio.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/gravitation-portfolios/content-archive-gravitation-portfolio.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/gravitation-portfolios/gravitation-portfolios-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/gravitation-portfolios/content-single-gravitation-portfolio.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/gravitation-portfolios/archive-gravitation-portfolio.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/gravitation-portfolios.php
    • > Network (severe)
    wp-admin/gravitation-portfolios.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=gv_portfolios
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=gv_portfolios:424:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&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,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=gv_portfolios
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&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/gravitation-portfolios/meta-box-class/js/meta-box.js:193:73)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/gravitation-portfolios/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,moxiejs,plupload&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,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=gv_portfolios
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/post-new.php?post_type=gv_portfolios
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&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

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (http://ulisesfreitas.com/gravitation-portfolios/screenshot-3.png)
Please take inspiration from this readme.txt

gravitation-portfolios/gravitation-portfolios.php 92% from 13 tests

The main file in "Gravitation Portfolios" v. 1.0.0 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:
  • Description: The description should be shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin18,462 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript161,4351,1489,161
CSS91651176,537
PHP104701,0421,946
PO File8174198530
SVG100288

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity126.00
▷ Minimum class complexity5.00
▷ Maximum class complexity247.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods76
▷ Static methods11.32%
▷ Public methods7598.68%
▷ Protected methods00.00%
▷ Private methods11.32%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
26 compressed PNG files occupy 0.76MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
meta-box-class/js/jquery-ui/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
meta-box-class/images/add.png0.12KB0.12KB▼ 0.81%
meta-box-class/images/edit.png0.25KB0.25KB0.00%
meta-box-class/js/jquery-ui/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
images/no-hay-imagen.png0.47KB0.47KB0.00%