84% ruven-themes-portfolio

Code Review | Ruven Themes: Portfolio

WordPress plugin Ruven Themes: Portfolio scored84%from 54 tests.

About plugin

  • Plugin page: ruven-themes-port...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.0
  • WordPress version: 6.3.1
  • First release: May 21, 2014
  • Latest release: Sep 5, 2014
  • Number of updates: 4
  • Update frequency: every 28.0 days
  • Top authors: Ruven Themes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,190 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.33ms] Passed 4 tests

Server-side resources used by Ruven Themes: Portfolio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.41 ▼2.00
Dashboard /wp-admin3.36 ▲0.0144.12 ▼19.32
Posts /wp-admin/edit.php3.41 ▲0.0544.81 ▼2.81
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.37 ▼5.20
Media Library /wp-admin/upload.php3.28 ▲0.0533.69 ▼1.31
Add New /wp-admin/post-new.php?post_type=portfolio3.4452.06
Types /wp-admin/edit-tags.php?taxonomy=portfolio-type&post_type=portfolio3.2833.29
Portfolio /wp-admin/edit.php?post_type=portfolio3.3333.88

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • Illegal file modification detected: 2 files (0.00KB) outside of "wp-content/plugins/ruven-themes-portfolio/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/ruven-themes-portfolio/assets/icon-256\303\227256.png"
    • (new file) "wp-content/plugins/ruven-themes-portfolio/assets/icon-128\303\227128.png"
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Ruven Themes: Portfolio
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12414.47 ▲0.101.93 ▲0.0141.18 ▼14.01
Dashboard /wp-admin2,234 ▲495.88 ▲0.07108.40 ▲0.6840.58 ▼0.93
Posts /wp-admin/edit.php2,119 ▲301.97 ▼0.0740.88 ▲2.7436.15 ▲1.43
Add New Post /wp-admin/post-new.php1,560 ▲1823.23 ▲4.51593.88 ▼70.0647.16 ▼2.95
Media Library /wp-admin/upload.php1,422 ▲344.20 ▼0.0396.39 ▼4.7141.41 ▼0.65
Add New /wp-admin/post-new.php?post_type=portfolio2,8267.72190.7576.25
Types /wp-admin/edit-tags.php?taxonomy=portfolio-type&post_type=portfolio1,2962.1427.0828.59
Portfolio /wp-admin/edit.php?post_type=portfolio1,1431.9334.0729.20

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please 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_action() in wp-content/plugins/ruven-themes-portfolio/ruven-themes-portfolio.php:31

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 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: custom post type, portfolio

ruven-themes-portfolio/ruven-themes-portfolio.php Passed 13 tests

The principal PHP file in "Ruven Themes: Portfolio" v. 1.0 is loaded by WordPress automatically on each request
73 characters long description:
Extends the functionality of Ruven Themes by adding a Portfolio post type

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
Good job! No executable or dangerous file extensions detected93 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1482693

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256×256.png4.33KB1.56KB▼ 63.93%
assets/icon-128×128.png4.83KB2.33KB▼ 51.91%