10% project-by-parseh

Code Review | Projects by Parseh

WordPress plugin Projects by Parseh scored10%from 54 tests.

About plugin

  • Plugin page: project-by-parseh
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Sep 9, 2015
  • Latest release: Sep 9, 2015
  • Number of updates: 15
  • Update frequency: N/A
  • Top authors: mojtabamoosavi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /661 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/project-by-parseh/project.php+458
    Function create_function() is deprecated

Server metrics [RAM: ▼1.94MB] [CPU: ▼52.11ms] Passed 4 tests

Analyzing server-side resources used by Projects by Parseh
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.425.44 ▼36.62
Dashboard /wp-admin2.07 ▼1.247.36 ▼43.62
Posts /wp-admin/edit.php2.07 ▼1.297.09 ▼45.78
Add New Post /wp-admin/post-new.php2.07 ▼3.826.95 ▼82.40
Media Library /wp-admin/upload.php2.07 ▼1.165.63 ▼26.46
دسته بندی /wp-admin/edit-tags.php?taxonomy=projects_category&post_type=projects2.075.38
تنظیمات /wp-admin/edit.php?post_type=projects&page=projects-settings2.076.74
همه پروژه ها /wp-admin/edit.php?post_type=projects2.075.59
افزودن پروژه جدید /wp-admin/post-new.php?post_type=projects2.076.30

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 75 new files
Database: no new tables, 15 new options
New WordPress options
projects_website
widget_project_widget
projects_date
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
projects_gallery_type
projects_client
can_compress_scripts
db_upgraded
...

Browser metrics Passed 4 tests

Checking browser requirements for Projects by Parseh
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,085 ▲32415.04 ▲0.667.60 ▲5.8339.55 ▼10.27
Dashboard /wp-admin2,384 ▲2106.31 ▲0.46114.49 ▲12.1646.63 ▲5.06
Posts /wp-admin/edit.php2,315 ▲2153.45 ▲1.4348.66 ▲11.5836.43 ▲1.15
Add New Post /wp-admin/post-new.php1,595 ▲3923.42 ▲5.14676.20 ▲33.0835.16 ▼24.28
Media Library /wp-admin/upload.php1,452 ▲494.28 ▲0.1080.96 ▼19.9746.61 ▲1.85
دسته بندی /wp-admin/edit-tags.php?taxonomy=projects_category&post_type=projects1,4873.4241.7442.07
تنظیمات /wp-admin/edit.php?post_type=projects&page=projects-settings1,2243.2950.2974.99
همه پروژه ها /wp-admin/edit.php?post_type=projects1,3613.5346.5245.34
افزودن پروژه جدید /wp-admin/post-new.php?post_type=projects3,0799.67234.17127.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/project-by-parseh/project.php+458
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 15 options in the database
    • projects_date
    • theysaidso_admin_options
    • projects_view
    • projects_like
    • projects_column
    • widget_project_widget
    • db_upgraded
    • projects_website
    • widget_recent-comments
    • widget_recent-posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=projects
    • > Deprecated in wp-content/plugins/project-by-parseh/project.php+458
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=projects
    • > Warning in wp-content/plugins/project-by-parseh/metabox/init.php+747
    count(): Parameter must be an array or an object that implements Countable

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/project-by-parseh/metabox/tests/phpunit/includes/bootstrap.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/project-by-parseh/setting.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/project-by-parseh/include/like.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/project-by-parseh/metabox/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/project-by-parseh/include/register-script.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/project-by-parseh/metabox/metabox-functions.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/project-by-parseh/metabox/tests/phpunit/tests/CMB_Core_Test.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/project-by-parseh/about.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/project-by-parseh/include/register-script.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (The projects list page), #2 (A single project page), #3 (The projects management screen within the WordPress dashboard.), #4 (The new project page), #5 (Plugin settings page)
The official readme.txt is a good inspiration

project-by-parseh/project.php 85% from 13 tests

The principal PHP file in "Projects by Parseh" v. 1.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("project-by-parseh.php" instead of "project.php")
  • Description: The description should be shorter than 140 characters (currently 180 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
No dangerous file extensions were detected10,268 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript91,2901,7654,632
PHP156341,1332,404
SVG3001,496
CSS8176621,339
Markdown3830272
Bourne Shell115459
JSON10031
YAML15018
XML10117

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity51.50
▷ Minimum class complexity1.00
▷ Maximum class complexity136.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods138
▷ Static methods3424.64%
▷ Public methods13698.55%
▷ Protected methods21.45%
▷ Private methods00.00%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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
15 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
metabox/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
metabox/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
metabox/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
metabox/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
css/img/icons.png0.71KB0.43KB▼ 39.64%