10% simple-but-powerful-html-and-pdf-job-board

Code Review | Simple but Powerful HTML and PDF Job Board

WordPress plugin Simple but Powerful HTML and PDF Job Board scored10%from 54 tests.

About plugin

  • Plugin page: simple-but-powerf...
  • Plugin version: 0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.4.1
  • WordPress version: 6.3.1
  • First release: Jan 31, 2016
  • Latest release: Jan 22, 2016
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: MichaelNi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,417 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Parse error in wp-content/plugins/simple-but-powerful-html-and-pdf-job-board/spjb.php+690
    syntax error, unexpected end of file

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.27ms] Passed 4 tests

Analyzing server-side resources used by Simple but Powerful HTML and PDF Job Board
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.59 ▼3.62
Dashboard /wp-admin3.31 ▼0.0447.63 ▼10.85
Posts /wp-admin/edit.php3.36 ▲0.0045.76 ▼2.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0075.60 ▼24.02
Media Library /wp-admin/upload.php3.23 ▲0.0032.17 ▼1.62

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple but Powerful HTML and PDF Job Board
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.48 ▼0.161.67 ▼0.3444.59 ▼3.83
Dashboard /wp-admin2,206 ▲155.76 ▲0.87118.72 ▲13.4241.60 ▼2.11
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0039.61 ▼2.8834.81 ▼3.83
Add New Post /wp-admin/post-new.php1,514 ▼2923.39 ▲4.95673.95 ▲71.0755.29 ▲7.02
Media Library /wp-admin/upload.php1,391 ▲64.30 ▲0.0895.33 ▼5.1743.39 ▲0.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-but-powerful-html-and-pdf-job-board/includes/tcpdf/tools/tcpdf_addfont.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/simple-but-powerful-html-and-pdf-job-board/spjb.php on line 690
    • > PHP Fatal error
      Uncaught Error: Class 'FPDF' not found in wp-content/plugins/simple-but-powerful-html-and-pdf-job-board/includes/fpdi/fpdi_bridge.php:32
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/simple-but-powerful-html-and-pdf-job-board/includes/tcpdf/tcpdf.php on line 17778
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/simple-but-powerful-html-and-pdf-job-board/includes/tcpdf/tcpdf.php on line 17778
    • > PHP Fatal error
      Uncaught Error: Class 'FPDF' not found in wp-content/plugins/simple-but-powerful-html-and-pdf-job-board/includes/fpdi/fpdi_bridge.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'FPDF' not found in wp-content/plugins/simple-but-powerful-html-and-pdf-job-board/includes/fpdi/fpdi_bridge.php:32
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/simple-but-powerful-html-and-pdf-job-board/includes/tcpdf/tcpdf.php on line 17778

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: advertisment, jobs, pdf, job board, html

simple-but-powerful-html-and-pdf-job-board/spjb.php 85% from 13 tests

The entry point to "Simple but Powerful HTML and PDF Job Board" version 0.9 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-but-powerful-html-and-pdf-job-board.php" instead of "spjb.php")
  • Description: The description should be shorter than 140 characters (currently 183 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin48,475 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP432,05712,64648,355
HTML19047
JSON10040
CSS19033

PHP code 0% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 4,349)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 499)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity271.72
▷ Minimum class complexity1.00
▷ Maximum class complexity4,349.00
Average method complexity9.76
▷ Minimum method complexity1.00
▷ Maximum method complexity499.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods773
▷ Static methods10713.84%
▷ Public methods47261.06%
▷ Protected methods30138.94%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants120
▷ Global constants10688.33%
▷ Class constants1411.67%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/img/yes.png0.36KB0.49KB0.00%
includes/img/info2.png0.38KB0.34KB▼ 10.39%
includes/img/no.png0.33KB0.40KB0.00%
includes/img/info.png0.39KB0.34KB▼ 11.56%