72% writers-pro

Code Review | Writing.Pro

WordPress plugin Writing.Pro scored72%from 54 tests.

About plugin

  • Plugin page: writers-pro
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2019
  • Latest release: Feb 22, 2019
  • Number of updates: 4
  • Update frequency: every 2.0 days
  • Top authors: contentlocalized (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /434 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼8.46ms] Passed 4 tests

Analyzing server-side resources used by Writing.Pro
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1936.04 ▼1.04
Dashboard /wp-admin3.57 ▲0.2247.25 ▼18.08
Posts /wp-admin/edit.php3.62 ▲0.2648.97 ▼0.70
Add New Post /wp-admin/post-new.php6.11 ▲0.2282.71 ▼14.01
Media Library /wp-admin/upload.php3.43 ▲0.2039.22 ▲3.11
Order Blog Post /wp-admin/admin.php?page=clwp&action=new_blog_posting3.3735.86
Settings /wp-admin/admin.php?page=clwp&action=settings3.4131.39
Order PPC Ad /wp-admin/admin.php?page=clwp&action=new_pcc_ads_writing3.3733.62
Dashboard /wp-admin/admin.php?page=clwp3.3729.29

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 330 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Writing.Pro
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲10713.52 ▼0.901.63 ▼0.0739.95 ▼0.37
Dashboard /wp-admin2,236 ▲455.09 ▼0.77112.53 ▲1.2375.43 ▲28.90
Posts /wp-admin/edit.php2,128 ▲362.29 ▲0.2840.12 ▼2.2336.16 ▼2.31
Add New Post /wp-admin/post-new.php1,703 ▲18922.61 ▲4.92712.64 ▲42.4531.20 ▼26.26
Media Library /wp-admin/upload.php1,433 ▲454.56 ▲0.33106.21 ▲0.2844.39 ▼1.12
Order Blog Post /wp-admin/admin.php?page=clwp&action=new_blog_posting1,5872.7530.7044.33
Settings /wp-admin/admin.php?page=clwp&action=settings9161.8727.3534.33
Order PPC Ad /wp-admin/admin.php?page=clwp&action=new_pcc_ads_writing1,5872.7431.8240.87
Dashboard /wp-admin/admin.php?page=clwp1,5872.7432.3440.58

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% 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)
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=clwp
    • > User deprecated in wp-includes/class-requests.php+24
    The PSR-0 `Requests_...` class names in the Requests library are deprecated. Switch to the PSR-4 `WpOrg\Requests\...` class names at your earliest convenience.
    • > GET request to /wp-admin/admin.php?page=clwp
    • > Notice in wp-content/plugins/writers-pro/includes/admin/writers-pro-admin-pages-trait.php+17
    Undefined index: action

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/writers-pro/admin/partials/view_article.php
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: order in wp-content/plugins/writers-pro/admin/partials/view_article.php on line 110
    • > PHP Fatal error
      require(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/writers-pro/includes/admin/class-writers-pro-article-list.php on line 4
    • > PHP Fatal error
      Trait 'Contentlocalized\\CLWP_WritersPro_Admin_Pages_Trait' not found in wp-content/plugins/writers-pro/admin/class-writers-pro-admin.php on line 15
    • > PHP Notice
      Undefined variable: order in wp-content/plugins/writers-pro/admin/partials/view_article.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/writers-pro/admin/partials/dashboard.php:3
    • > PHP Warning
      require(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/writers-pro/includes/admin/class-writers-pro-article-list.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Contentlocalized\\WritersPro\\ContentlocalizedAPI' not found in wp-content/plugins/writers-pro/admin/partials/balance.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/writers-pro/admin/partials/view_article.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/writers-pro/admin/partials/settings.php:11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/writers-pro/includes/admin/class-writers-pro-article-list.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: "https:/contentlocalized.com"
  • Screenshots: These screenshots do not have images: #1 (Activation of Writing.Pro Plugin), #2 (Dashboard where you can see your orders), #3 (Create new order with just a couple of clicks), #4 (View your completed orders)
Please take inspiration from this readme.txt

writers-pro/writers-pro.php 92% from 13 tests

The main PHP file in "Writing.Pro" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected2,465 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP172635391,124
CSS219391,043
JavaScript2755298

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.88
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods55
▷ Static methods1425.45%
▷ Public methods4785.45%
▷ Protected methods00.00%
▷ Private methods814.55%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
304 PNG files occupy 0.27MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/flags_iso/16/sh.png3.92KB0.58KB▼ 85.16%
admin/img/flags_iso/16/bm.png0.59KB0.55KB▼ 7.10%
admin/img/flags_iso/16/np.png0.62KB0.52KB▼ 15.93%
admin/img/flags_iso/16/ci.png0.42KB0.46KB0.00%
admin/img/flags_iso/16/sw.png0.62KB0.59KB▼ 4.60%