84% uw-freelancer

Code Review | UW Freelancer

WordPress plugin UW Freelancer scored84%from 54 tests.

About plugin

  • Plugin page: uw-freelancer
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 13, 2013
  • Latest release: Feb 13, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: Upeksha Wisidagama (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,503 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.90ms] 75% from 4 tests

A check of server-side resources used by UW Freelancer
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 2,652.89ms on /wp-admin/admin.php?page=uw-freelancer-settings)
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.22 ▼1.61
Dashboard /wp-admin3.35 ▲0.0548.11 ▼6.30
Posts /wp-admin/edit.php3.47 ▲0.1148.26 ▼2.60
Add New Post /wp-admin/post-new.php5.93 ▲0.0581.43 ▼13.09
Media Library /wp-admin/upload.php3.28 ▲0.0535.05 ▼1.20
Dashboard /wp-admin/admin.php?page=uw-freelancer-settings3.802,652.89
API Console /wp-admin/admin.php?page=uw-freelancer-api-console3.2431.03

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 11 new options
New WordPress options
widget_uw-freelancer-affiliate
uw_freelancer_styles
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
uw_freelancer_options
widget_uw-freelancer-feedback-r
widget_uw-freelancer-profile
...

Browser metrics Passed 4 tests

UW Freelancer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲20413.56 ▼0.828.20 ▲6.4940.24 ▼0.60
Dashboard /wp-admin2,232 ▲415.84 ▲0.96109.04 ▲5.2173.78 ▲30.57
Posts /wp-admin/edit.php2,118 ▲292.00 ▼0.0238.14 ▼3.0134.35 ▲0.07
Add New Post /wp-admin/post-new.php1,545 ▲3118.44 ▲0.83686.92 ▲75.7159.69 ▲1.92
Media Library /wp-admin/upload.php1,417 ▲264.23 ▼0.0198.60 ▼0.4647.34 ▲4.69
Dashboard /wp-admin/admin.php?page=uw-freelancer-settings9052.0427.0230.81
API Console /wp-admin/admin.php?page=uw-freelancer-api-console8312.0726.9928.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_uw-freelancer-feedback-r
    • widget_uw-freelancer-profile
    • widget_uw-freelancer-affiliate
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/uw-freelancer/inc/class-uwf-profile.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/uw-freelancer/uw-freelancer.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/uw-freelancer/inc/class-uwf-affiliate.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/uw-freelancer/inc/class-uwf-feedback.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: freelancercom, affiliate widget, freelancer, profile widget, feedback widget

uw-freelancer/uw-freelancer.php Passed 13 tests

The entry point to "UW Freelancer" version 0.1 is a PHP file that has certain tags in its header comment area
119 characters long description:
Display freelancer.com user information, including feedback, using widgets. ( + freelancer.com project listing widget )

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
Everything looks great! No dangerous files found in this plugin2,762 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP17322411,318
CSS436521,181
PO File15556123
Sass23169
JavaScript218365
Ruby16126

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity15.83
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
21 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png0.36KB0.18KB▼ 51.09%
images/uw-freelancer-gold-member.png5.72KB3.15KB▼ 44.97%
images/uw-freelancer-icon.png3.07KB0.45KB▼ 85.29%
images/uw-freelancer-hireme.png2.61KB2.51KB▼ 3.60%
css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png0.38KB0.15KB▼ 59.69%